this library has few changes from the original library, for effects of this work.
FATFileSystem/FATDirHandle.h@0:8214896432e0, 2018-05-21 (annotated)
- Committer:
- FannyCalle
- Date:
- Mon May 21 15:10:37 2018 +0000
- Revision:
- 0:8214896432e0
el sd hay que revisar;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
FannyCalle | 0:8214896432e0 | 1 | /* mbed Microcontroller Library |
FannyCalle | 0:8214896432e0 | 2 | * Copyright (c) 2006-2012 ARM Limited |
FannyCalle | 0:8214896432e0 | 3 | * |
FannyCalle | 0:8214896432e0 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
FannyCalle | 0:8214896432e0 | 5 | * of this software and associated documentation files (the "Software"), to deal |
FannyCalle | 0:8214896432e0 | 6 | * in the Software without restriction, including without limitation the rights |
FannyCalle | 0:8214896432e0 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
FannyCalle | 0:8214896432e0 | 8 | * copies of the Software, and to permit persons to whom the Software is |
FannyCalle | 0:8214896432e0 | 9 | * furnished to do so, subject to the following conditions: |
FannyCalle | 0:8214896432e0 | 10 | * |
FannyCalle | 0:8214896432e0 | 11 | * The above copyright notice and this permission notice shall be included in |
FannyCalle | 0:8214896432e0 | 12 | * all copies or substantial portions of the Software. |
FannyCalle | 0:8214896432e0 | 13 | * |
FannyCalle | 0:8214896432e0 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
FannyCalle | 0:8214896432e0 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
FannyCalle | 0:8214896432e0 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
FannyCalle | 0:8214896432e0 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
FannyCalle | 0:8214896432e0 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
FannyCalle | 0:8214896432e0 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
FannyCalle | 0:8214896432e0 | 20 | * SOFTWARE. |
FannyCalle | 0:8214896432e0 | 21 | */ |
FannyCalle | 0:8214896432e0 | 22 | #ifndef MBED_FATDIRHANDLE_H |
FannyCalle | 0:8214896432e0 | 23 | #define MBED_FATDIRHANDLE_H |
FannyCalle | 0:8214896432e0 | 24 | |
FannyCalle | 0:8214896432e0 | 25 | #include "DirHandle.h" |
FannyCalle | 0:8214896432e0 | 26 | |
FannyCalle | 0:8214896432e0 | 27 | using namespace mbed; |
FannyCalle | 0:8214896432e0 | 28 | |
FannyCalle | 0:8214896432e0 | 29 | class FATDirHandle : public DirHandle { |
FannyCalle | 0:8214896432e0 | 30 | |
FannyCalle | 0:8214896432e0 | 31 | public: |
FannyCalle | 0:8214896432e0 | 32 | FATDirHandle(const FATFS_DIR &the_dir); |
FannyCalle | 0:8214896432e0 | 33 | virtual int closedir(); |
FannyCalle | 0:8214896432e0 | 34 | virtual struct dirent *readdir(); |
FannyCalle | 0:8214896432e0 | 35 | virtual void rewinddir(); |
FannyCalle | 0:8214896432e0 | 36 | virtual off_t telldir(); |
FannyCalle | 0:8214896432e0 | 37 | virtual void seekdir(off_t location); |
FannyCalle | 0:8214896432e0 | 38 | |
FannyCalle | 0:8214896432e0 | 39 | private: |
FannyCalle | 0:8214896432e0 | 40 | FATFS_DIR dir; |
FannyCalle | 0:8214896432e0 | 41 | struct dirent cur_entry; |
FannyCalle | 0:8214896432e0 | 42 | |
FannyCalle | 0:8214896432e0 | 43 | }; |
FannyCalle | 0:8214896432e0 | 44 | |
FannyCalle | 0:8214896432e0 | 45 | #endif |