forked
Fork of FatFileSystemCpp by
FATDirHandle.h@2:5cdf6d5c3b68, 2013-03-06 (annotated)
- Committer:
- YongChingTee
- Date:
- Wed Mar 06 00:19:18 2013 +0000
- Revision:
- 2:5cdf6d5c3b68
- Parent:
- 0:6ceefe1c53e4
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AdamGreen | 0:6ceefe1c53e4 | 1 | /* mbed Microcontroller Library - FATDirHandle |
AdamGreen | 0:6ceefe1c53e4 | 2 | * Copyright (c) 2008, sford |
AdamGreen | 0:6ceefe1c53e4 | 3 | */ |
AdamGreen | 0:6ceefe1c53e4 | 4 | |
AdamGreen | 0:6ceefe1c53e4 | 5 | #ifndef MBED_FATDIRHANDLE_H |
AdamGreen | 0:6ceefe1c53e4 | 6 | #define MBED_FATDIRHANDLE_H |
AdamGreen | 0:6ceefe1c53e4 | 7 | |
AdamGreen | 0:6ceefe1c53e4 | 8 | #include "DirHandle.h" |
AdamGreen | 0:6ceefe1c53e4 | 9 | #include "ff.h" |
AdamGreen | 0:6ceefe1c53e4 | 10 | |
AdamGreen | 0:6ceefe1c53e4 | 11 | namespace mbed { |
AdamGreen | 0:6ceefe1c53e4 | 12 | |
AdamGreen | 0:6ceefe1c53e4 | 13 | class FATDirHandle : public DirHandle { |
AdamGreen | 0:6ceefe1c53e4 | 14 | |
AdamGreen | 0:6ceefe1c53e4 | 15 | public: |
AdamGreen | 0:6ceefe1c53e4 | 16 | FATDirHandle(const FATFS_DIR &the_dir); |
AdamGreen | 0:6ceefe1c53e4 | 17 | virtual int closedir(); |
AdamGreen | 0:6ceefe1c53e4 | 18 | virtual struct dirent *readdir(); |
AdamGreen | 0:6ceefe1c53e4 | 19 | virtual void rewinddir(); |
AdamGreen | 0:6ceefe1c53e4 | 20 | virtual off_t telldir(); |
AdamGreen | 0:6ceefe1c53e4 | 21 | virtual void seekdir(off_t location); |
AdamGreen | 0:6ceefe1c53e4 | 22 | |
AdamGreen | 0:6ceefe1c53e4 | 23 | private: |
AdamGreen | 0:6ceefe1c53e4 | 24 | FATFS_DIR dir; |
AdamGreen | 0:6ceefe1c53e4 | 25 | struct dirent cur_entry; |
AdamGreen | 0:6ceefe1c53e4 | 26 | |
AdamGreen | 0:6ceefe1c53e4 | 27 | }; |
AdamGreen | 0:6ceefe1c53e4 | 28 | |
AdamGreen | 0:6ceefe1c53e4 | 29 | } |
AdamGreen | 0:6ceefe1c53e4 | 30 | |
AdamGreen | 0:6ceefe1c53e4 | 31 | #endif |