X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Ffs.h;h=aa3604db8dc4c5ae77a23b059a7edb027e48e43a;hb=0223462b373b975d970fa86e5e1a7eadd1d41820;hp=163da103b472bd65fae7c7ef71ea50815385bcae;hpb=582d97b6d37ed1bfce575c32d3847a42fc633b8e;p=platform%2Fkernel%2Fu-boot.git diff --git a/include/fs.h b/include/fs.h index 163da10..aa3604d 100644 --- a/include/fs.h +++ b/include/fs.h @@ -156,6 +156,24 @@ struct fs_dirent *fs_readdir(struct fs_dir_stream *dirs); void fs_closedir(struct fs_dir_stream *dirs); /* + * fs_unlink - delete a file or directory + * + * If a given name is a directory, it will be deleted only if it's empty + * + * @filename: Name of file or directory to delete + * @return 0 on success, -1 on error conditions + */ +int fs_unlink(const char *filename); + +/* + * fs_mkdir - Create a directory + * + * @filename: Name of directory to create + * @return 0 on success, -1 on error conditions + */ +int fs_mkdir(const char *filename); + +/* * Common implementation for various filesystem commands, optionally limited * to a specific filesystem type via the fstype parameter. */ @@ -169,6 +187,10 @@ int file_exists(const char *dev_type, const char *dev_part, const char *file, int fstype); int do_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], int fstype); +int do_rm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], + int fstype); +int do_mkdir(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[], + int fstype); /* * Determine the UUID of the specified filesystem and print it. Optionally it is