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