This is SDFileSystem which corrected the bug for MiMicSDK.
Dependents: MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more
Fork of SDFileSystem by
FATFileSystem/FATDirHandle.h@9:b2ca0e66c1f7, 2013-11-12 (annotated)
- Committer:
- nyatla
- Date:
- Tue Nov 12 03:41:14 2013 +0000
- Revision:
- 9:b2ca0e66c1f7
- Parent:
- 6:972a52e4d92c
fix warning.;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nyatla | 5:2c7b6bd5b079 | 1 | /* mbed Microcontroller Library |
nyatla | 5:2c7b6bd5b079 | 2 | * Copyright (c) 2006-2012 ARM Limited |
nyatla | 5:2c7b6bd5b079 | 3 | * |
nyatla | 5:2c7b6bd5b079 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
nyatla | 5:2c7b6bd5b079 | 5 | * of this software and associated documentation files (the "Software"), to deal |
nyatla | 5:2c7b6bd5b079 | 6 | * in the Software without restriction, including without limitation the rights |
nyatla | 5:2c7b6bd5b079 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
nyatla | 5:2c7b6bd5b079 | 8 | * copies of the Software, and to permit persons to whom the Software is |
nyatla | 5:2c7b6bd5b079 | 9 | * furnished to do so, subject to the following conditions: |
nyatla | 5:2c7b6bd5b079 | 10 | * |
nyatla | 5:2c7b6bd5b079 | 11 | * The above copyright notice and this permission notice shall be included in |
nyatla | 5:2c7b6bd5b079 | 12 | * all copies or substantial portions of the Software. |
nyatla | 5:2c7b6bd5b079 | 13 | * |
nyatla | 5:2c7b6bd5b079 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
nyatla | 5:2c7b6bd5b079 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
nyatla | 5:2c7b6bd5b079 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
nyatla | 5:2c7b6bd5b079 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
nyatla | 5:2c7b6bd5b079 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
nyatla | 5:2c7b6bd5b079 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
nyatla | 5:2c7b6bd5b079 | 20 | * SOFTWARE. |
nyatla | 5:2c7b6bd5b079 | 21 | */ |
nyatla | 5:2c7b6bd5b079 | 22 | #ifndef MBED_FATDIRHANDLE_H |
nyatla | 5:2c7b6bd5b079 | 23 | #define MBED_FATDIRHANDLE_H |
nyatla | 6:972a52e4d92c | 24 | #include "ff.h" |
nyatla | 5:2c7b6bd5b079 | 25 | #include "DirHandle.h" |
nyatla | 5:2c7b6bd5b079 | 26 | |
nyatla | 5:2c7b6bd5b079 | 27 | using namespace mbed; |
nyatla | 5:2c7b6bd5b079 | 28 | |
nyatla | 6:972a52e4d92c | 29 | struct direntFAT:public dirent |
nyatla | 6:972a52e4d92c | 30 | { |
nyatla | 6:972a52e4d92c | 31 | unsigned char fattrib; |
nyatla | 6:972a52e4d92c | 32 | unsigned int fsize; |
nyatla | 6:972a52e4d92c | 33 | }; |
nyatla | 6:972a52e4d92c | 34 | |
nyatla | 5:2c7b6bd5b079 | 35 | class FATDirHandle : public DirHandle { |
nyatla | 5:2c7b6bd5b079 | 36 | |
nyatla | 5:2c7b6bd5b079 | 37 | public: |
nyatla | 5:2c7b6bd5b079 | 38 | FATDirHandle(const FATFS_DIR &the_dir); |
nyatla | 5:2c7b6bd5b079 | 39 | virtual int closedir(); |
nyatla | 5:2c7b6bd5b079 | 40 | virtual struct dirent *readdir(); |
nyatla | 5:2c7b6bd5b079 | 41 | virtual void rewinddir(); |
nyatla | 5:2c7b6bd5b079 | 42 | virtual off_t telldir(); |
nyatla | 5:2c7b6bd5b079 | 43 | virtual void seekdir(off_t location); |
nyatla | 5:2c7b6bd5b079 | 44 | |
nyatla | 5:2c7b6bd5b079 | 45 | private: |
nyatla | 5:2c7b6bd5b079 | 46 | FATFS_DIR dir; |
nyatla | 6:972a52e4d92c | 47 | struct direntFAT cur_entry; |
nyatla | 5:2c7b6bd5b079 | 48 | |
nyatla | 5:2c7b6bd5b079 | 49 | }; |
nyatla | 5:2c7b6bd5b079 | 50 | |
nyatla | 5:2c7b6bd5b079 | 51 | #endif |