mufs: implement mufs_stat()

This commit is contained in:
S.J.R. van Schaik 2017-06-12 13:50:05 +02:00
parent 26b0ccb405
commit beb5f64c12
2 changed files with 10 additions and 0 deletions

View file

@ -39,6 +39,8 @@ int mufs_mount(struct mufs *fs, struct flash_dev *dev);
int mufs_format(struct flash_dev *dev);
char *mufs_abspath(const char *path);
int mufs_stat(struct mufs *fs, const char *path, struct mufs_stat *stat);
struct mufs_dir *mufs_opendir(struct mufs *fs, const char *path);
void mufs_closedir(struct mufs_dir *dir);
int mufs_readdir(struct mufs_dir *dir, struct mufs_dirent *dirent);

View file

@ -66,3 +66,11 @@ int mufs_mkpath(struct mufs *fs, const char *path, unsigned type)
return -1;
}
int mufs_stat(struct mufs *fs, const char *path, struct mufs_stat *stat)
{
if (!resolve_path(fs, path, stat))
return -1;
return 0;
}