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