First working version of a FATFileSystem compatible Chan FAT v0.8 implementation. This is intended to use with long file names and RTOS support. For now long file names work but RTOS support is still untested.

Dependents:   USB_MSC USB_CDC_MSD_Hello TFTPServerTest DMXStation ... more

Committer:
NeoBelerophon
Date:
Fri Feb 04 19:59:52 2011 +0000
Revision:
1:0edb6732d53d
Parent:
0:8ea634413549
Child:
2:629e4be333f3
Added FATDirHandle::getdir() -> return dir path string

Who changed what in which revision?

UserRevisionLine numberNew contents of line
NeoBelerophon 0:8ea634413549 1 /* mbed Microcontroller Library - FATDirHandle
NeoBelerophon 0:8ea634413549 2 * Copyright (c) 2008, sford
NeoBelerophon 0:8ea634413549 3 */
NeoBelerophon 0:8ea634413549 4
NeoBelerophon 0:8ea634413549 5 #ifndef MBED_FATDIRHANDLE_H
NeoBelerophon 0:8ea634413549 6 #define MBED_FATDIRHANDLE_H
NeoBelerophon 0:8ea634413549 7
NeoBelerophon 0:8ea634413549 8 #include "DirHandle.h"
NeoBelerophon 0:8ea634413549 9 #include "ff.h"
NeoBelerophon 0:8ea634413549 10
NeoBelerophon 0:8ea634413549 11 namespace mbed {
NeoBelerophon 0:8ea634413549 12
NeoBelerophon 0:8ea634413549 13 class FATDirHandle : public DirHandle {
NeoBelerophon 0:8ea634413549 14
NeoBelerophon 0:8ea634413549 15 public:
NeoBelerophon 0:8ea634413549 16 FATDirHandle(const DIR_t &the_dir);
NeoBelerophon 0:8ea634413549 17 virtual int closedir();
NeoBelerophon 0:8ea634413549 18 virtual struct dirent *readdir();
NeoBelerophon 0:8ea634413549 19 virtual void rewinddir();
NeoBelerophon 0:8ea634413549 20 virtual off_t telldir();
NeoBelerophon 0:8ea634413549 21 virtual void seekdir(off_t location);
NeoBelerophon 1:0edb6732d53d 22 char* getdir() const {return dir.dir;}
NeoBelerophon 0:8ea634413549 23
NeoBelerophon 0:8ea634413549 24 private:
NeoBelerophon 0:8ea634413549 25 DIR_t dir;
NeoBelerophon 0:8ea634413549 26 struct dirent cur_entry;
NeoBelerophon 0:8ea634413549 27
NeoBelerophon 0:8ea634413549 28 };
NeoBelerophon 0:8ea634413549 29
NeoBelerophon 0:8ea634413549 30 }
NeoBelerophon 0:8ea634413549 31
NeoBelerophon 0:8ea634413549 32 #endif