50 int copy_file(
const char *dst,
const char *src);
105 typedef uint32_t attrib_t;
107 typedef char attrib_t;
127 void attrib_save(
const char *file, attrib_t attrib);
other
Definition: fs-utils.h:13
int path_exists(const char *path)
determine if a file or directory exists
Definition: fs-utils.c:192
char * win_path(char *path)
normalizes the path str to a Windows path
Definition: fs-utils.c:39
int unlink_dir_parents(const char *d)
delete a directory if it is empty, and repeat with each parent directory
Definition: fs-utils.c:132
int unlink_file(const char *f)
delete a file
Definition: fs-utils.c:159
attrib_t attrib_open(const char *file)
get the attributes of a file, and set the file attributes for writing
Definition: fs-utils.c:215
int unlink_dir(const char *d)
delete a directory
Definition: fs-utils.c:127
file_type_e file_type(const char *path)
determine the type of a file
Definition: fs-utils.c:183
int rename_file(const char *dst, const char *src)
rename a file or directory
Definition: fs-utils.c:114
int replace_file(const char *dst, const char *src)
replace a file or directory
Definition: fs-utils.c:118
file_type_e
Definition: fs-utils.h:11
int copy_file(const char *dst, const char *src)
copy a file
Definition: fs-utils.c:84
a directory
Definition: fs-utils.h:17
int unlink_recursive(const char *d)
delete a directory and its contents
Definition: fs-utils.c:164
attrib_t attrib_get(const char *file)
get the attributes of a file
Definition: fs-utils.c:212
char * unix_path(char *path)
normalizes the path str to a Unix path
Definition: fs-utils.c:43
void attrib_save(const char *file, attrib_t attrib)
restore the attributes of a file
Definition: fs-utils.c:218
a file
Definition: fs-utils.h:15
int make_dir(const char *d)
create a directory
Definition: fs-utils.c:47
int make_dir_parents(const char *d)
creating a directory and its parents as necessary
Definition: fs-utils.c:61