it's fat!

Fork of FATFileSystem by mbed official

Revision:
10:28e685e5ff7f
Parent:
5:b3b3370574cf
diff -r e2ab678eb692 -r 28e685e5ff7f FATDirHandle.cpp
--- a/FATDirHandle.cpp	Sat Jul 30 20:47:51 2016 +0000
+++ b/FATDirHandle.cpp	Mon Jul 10 15:37:41 2017 +0000
@@ -77,3 +77,13 @@
     dir.index = location;
 }
 
+ssize_t FATDirHandle::read(struct dirent *ent) {
+    struct dirent *temp = readdir();
+    if (!temp) {
+        return 0;
+    }
+    
+    memcpy(ent, temp, sizeof(*ent));
+    return 1;
+}
+