An assortment of functions used to manipulate paths and directories. More...
Go to the source code of this file.
Typedefs | |
typedef char | attrib_t |
Enumerations | |
enum | file_type_e { FILE_TYPE_OTHER, FILE_TYPE_FILE, FILE_TYPE_DIR } |
Functions | |
char * | win_path (char *path) |
normalizes the path str to a Windows path More... | |
char * | unix_path (char *path) |
normalizes the path str to a Unix path More... | |
int | make_dir (const char *d) |
create a directory More... | |
int | make_dir_parents (const char *d) |
creating a directory and its parents as necessary More... | |
int | copy_file (const char *dst, const char *src) |
copy a file More... | |
int | rename_file (const char *dst, const char *src) |
rename a file or directory More... | |
int | replace_file (const char *dst, const char *src) |
replace a file or directory More... | |
int | unlink_dir (const char *d) |
delete a directory More... | |
int | unlink_dir_parents (const char *d) |
delete a directory if it is empty, and repeat with each parent directory More... | |
int | unlink_file (const char *f) |
delete a file More... | |
int | unlink_recursive (const char *d) |
delete a directory and its contents More... | |
file_type_e | file_type (const char *path) |
determine the type of a file More... | |
int | path_exists (const char *path) |
determine if a file or directory exists More... | |
attrib_t | attrib_get (const char *file) |
get the attributes of a file More... | |
attrib_t | attrib_open (const char *file) |
get the attributes of a file, and set the file attributes for writing More... | |
void | attrib_save (const char *file, attrib_t attrib) |
restore the attributes of a file More... | |
An assortment of functions used to manipulate paths and directories.
enum file_type_e |
attrib_t attrib_get | ( | const char * | file | ) |
get the attributes of a file
file | the file |
attrib_t attrib_open | ( | const char * | file | ) |
get the attributes of a file, and set the file attributes for writing
file | the file |
void attrib_save | ( | const char * | file, |
attrib_t | attrib | ||
) |
restore the attributes of a file
file | the file |
attrib | the old attributes |
int copy_file | ( | const char * | dst, |
const char * | src | ||
) |
copy a file
dst | the absolute path of a new file |
src | the path of a file to make a copy of |
file_type_e file_type | ( | const char * | path | ) |
determine the type of a file
path | to the file or directory to check |
int make_dir | ( | const char * | d | ) |
create a directory
d | the directory to create |
int make_dir_parents | ( | const char * | d | ) |
creating a directory and its parents as necessary
d | the directory to create |
int path_exists | ( | const char * | path | ) |
determine if a file or directory exists
path | the file to check |
int rename_file | ( | const char * | dst, |
const char * | src | ||
) |
rename a file or directory
dst | the absolute path of the new name |
src | the path of what is being renamed |
int replace_file | ( | const char * | dst, |
const char * | src | ||
) |
replace a file or directory
dst | the absolute path of the new name |
src | the path of what is being replaced |
char* unix_path | ( | char * | path | ) |
normalizes the path str to a Unix path
path | the path to normalize |
int unlink_dir | ( | const char * | d | ) |
delete a directory
d | the directory to delete |
int unlink_dir_parents | ( | const char * | d | ) |
delete a directory if it is empty, and repeat with each parent directory
d | the directory to delete |
int unlink_file | ( | const char * | f | ) |
delete a file
f | the file to delete |
int unlink_recursive | ( | const char * | d | ) |
delete a directory and its contents
d | the directory to delete |
char* win_path | ( | char * | path | ) |
normalizes the path str to a Windows path
path | the path to normalize |