123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
-
- #ifndef MBED_LOCALFILESYSTEM_H
- #define MBED_LOCALFILESYSTEM_H
-
- #include "platform.h"
-
- #if DEVICE_LOCALFILESYSTEM
-
- #include "FileSystemLike.h"
-
- namespace mbed {
-
- FILEHANDLE local_file_open(const char* name, int flags);
-
- class LocalFileHandle : public FileHandle {
-
- public:
- LocalFileHandle(FILEHANDLE fh);
-
- virtual int close();
-
- virtual ssize_t write(const void *buffer, size_t length);
-
- virtual ssize_t read(void *buffer, size_t length);
-
- virtual int isatty();
-
- virtual off_t lseek(off_t position, int whence);
-
- virtual int fsync();
-
- virtual off_t flen();
-
- protected:
- FILEHANDLE _fh;
- int pos;
- };
-
-
- class LocalFileSystem : public FileSystemLike {
-
- public:
- LocalFileSystem(const char* n) : FileSystemLike(n) {
-
- }
-
- virtual FileHandle *open(const char* name, int flags);
- virtual int remove(const char *filename);
- virtual DirHandle *opendir(const char *name);
- };
-
- }
-
- #endif
-
- #endif
|