|
@ -45,7 +45,9 @@ int vfs_read (void* buffer, int dummy, int len, vfs_file_t* file) { |
|
|
|
|
|
|
|
|
vfs_dirent_t* vfs_readdir(vfs_dir_t* dir) { |
|
|
vfs_dirent_t* vfs_readdir(vfs_dir_t* dir) { |
|
|
FILINFO fi; |
|
|
FILINFO fi; |
|
|
|
|
|
#if _USE_LFN |
|
|
fi.lfname = NULL; |
|
|
fi.lfname = NULL; |
|
|
|
|
|
#endif |
|
|
FRESULT r = f_readdir(dir, &fi); |
|
|
FRESULT r = f_readdir(dir, &fi); |
|
|
if (r != FR_OK) return NULL; |
|
|
if (r != FR_OK) return NULL; |
|
|
if (fi.fname[0] == 0) return NULL; |
|
|
if (fi.fname[0] == 0) return NULL; |
|
@ -55,7 +57,9 @@ vfs_dirent_t* vfs_readdir(vfs_dir_t* dir) { |
|
|
|
|
|
|
|
|
int vfs_stat(vfs_t* vfs, const char* filename, vfs_stat_t* st) { |
|
|
int vfs_stat(vfs_t* vfs, const char* filename, vfs_stat_t* st) { |
|
|
FILINFO f; |
|
|
FILINFO f; |
|
|
|
|
|
#if _USE_LFN |
|
|
f.lfname = NULL; |
|
|
f.lfname = NULL; |
|
|
|
|
|
#endif |
|
|
if (FR_OK != f_stat(filename, &f)) { |
|
|
if (FR_OK != f_stat(filename, &f)) { |
|
|
return 1; |
|
|
return 1; |
|
|
} |
|
|
} |
|
|