Fork of FATFileSystem that exposes FILINFO in the FATDirHandle. This allows obtaining true file sizes and testing whether a dir pointer is a directory or a file.

Dependents:   SDFileSystemNoStall

Fork of FATFileSystem by mbed official

Revision:
6:7a3c53d25d96
Parent:
4:3ff2606d5713
--- a/FATFileSystem.h	Thu Oct 30 06:19:16 2014 +0000
+++ b/FATFileSystem.h	Thu Oct 30 07:01:15 2014 +0000
@@ -30,8 +30,8 @@
 using namespace mbed;
 
 /**
- * FATFileSystem based on ChaN's Fat Filesystem library v0.8 
- */
+  * FATFileSystem based on ChaN's Fat Filesystem library v0.8 
+  */
 class FATFileSystem : public FileSystemLike {
 public:
 
@@ -41,51 +41,36 @@
     static FATFileSystem * _ffs[_VOLUMES];   // FATFileSystem objects, as parallel to FatFs drives array
     FATFS _fs;                               // Work area (file system object) for logical drive
     int _fsid;
-
+    
     /**
-     * Opens a file on the filesystem
-     */
+      * Opens a file on the filesystem
+      */
     virtual FileHandle *open(const char* name, int flags);
     
     /**
      * Removes a file path
      */
     virtual int remove(const char *filename);
-    
-    /**
-     * Renames a file
-     */
-    virtual int rename(const char *oldname, const char *newname);
-    
+
     /**
      * Formats a logical drive, FDISK artitioning rule, 512 bytes per cluster
      */
     virtual int format();
-    
+
     /**
-     * Opens a directory on the filesystem
-     */
+      * Opens a directory on the filesystem
+      */
     virtual DirHandle *opendir(const char *name);
     
     /**
      * Creates a directory path
      */
     virtual int mkdir(const char *name, mode_t mode);
-    
-    /**
-     * Mounts the filesystem
-     */
-    virtual int mount();
-    
-    /**
-     * Unmounts the filesystem
-     */
-    virtual int unmount();
 
     virtual int disk_initialize() { return 0; }
     virtual int disk_status() { return 0; }
-    virtual int disk_read(uint8_t * buffer, uint64_t sector, uint8_t count) = 0;
-    virtual int disk_write(const uint8_t * buffer, uint64_t sector, uint8_t count) = 0;
+    virtual int disk_read(uint8_t * buffer, uint64_t sector) = 0;
+    virtual int disk_write(const uint8_t * buffer, uint64_t sector) = 0;
     virtual int disk_sync() { return 0; }
     virtual uint64_t disk_sectors() = 0;