mufs: implement mufs_stat()

tags/0.1.0
S.J.R. van Schaik 7 years ago
parent 26b0ccb405
commit beb5f64c12
  1. 2
      include/fs/mufs.h
  2. 8
      source/fs/mufs/path.c

@ -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);

@ -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;
}

Loading…
Cancel
Save