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
Diff: FATFileHandle.cpp
- Revision:
- 6:7a3c53d25d96
- Parent:
- 4:3ff2606d5713
--- a/FATFileHandle.cpp Thu Oct 30 06:19:16 2014 +0000 +++ b/FATFileHandle.cpp Thu Oct 30 07:01:15 2014 +0000 @@ -38,13 +38,13 @@ ssize_t FATFileHandle::write(const void* buffer, size_t length) { UINT n; FRESULT res = f_write(&_fh, buffer, length, &n); - if (res) { + if (res) { debug_if(FFS_DBG, "f_write() failed: %d", res); return -1; } return n; } - + ssize_t FATFileHandle::read(void* buffer, size_t length) { debug_if(FFS_DBG, "read(%d)\n", length); UINT n;