GRU - Generic Reusable Utilities
|
Functions | |
bool | gru_path_exists (const char *filename, gru_status_t *status) |
Checks whether a given file exists. More... | |
bool | gru_path_fexists (int fd, gru_status_t *status) |
Checks whether a given file exists based on it's file descriptor. More... | |
bool | gru_path_can_read_write (const char *filename, gru_status_t *status) |
Checks whether can read/write a given file. More... | |
bool | gru_path_rename_cond (const char *filename, gru_path_cond_t cond, gru_status_t *status) |
Renames a file based on a condition. More... | |
bool | gru_path_rename (const char *filename, gru_status_t *status) |
Renames a file. More... | |
char * | gru_path_format (const char *dir, const char *name, gru_status_t *status) |
Formats a path. More... | |
bool | gru_path_mkdir (const char *path, gru_status_t *status) |
Create a directory. More... | |
bool | gru_path_mkdirs (const char *path, gru_status_t *status) |
Given a path, this function will recursively create directories. More... | |
bool gru_path_can_read_write | ( | const char * | filename, |
gru_status_t * | status | ||
) |
Checks whether can read/write a given file.
filename | the filename |
status | status structure containing error code/description in case of failure |
bool gru_path_exists | ( | const char * | filename, |
gru_status_t * | status | ||
) |
Checks whether a given file exists.
filename | the filename |
status | status structure containing error code/description in case of failure |
bool gru_path_fexists | ( | int | fd, |
gru_status_t * | status | ||
) |
Checks whether a given file exists based on it's file descriptor.
fd | the file descriptor |
status | status structure containing error code/description in case of failure |
char* gru_path_format | ( | const char * | dir, |
const char * | name, | ||
gru_status_t * | status | ||
) |
Formats a path.
dir | directory of the file |
name | name of the file |
status | status structure containing error code/description in case of failure |
bool gru_path_mkdir | ( | const char * | path, |
gru_status_t * | status | ||
) |
Create a directory.
path | directory path |
status | status structure containing error code/description in case of failure |
bool gru_path_mkdirs | ( | const char * | path, |
gru_status_t * | status | ||
) |
Given a path, this function will recursively create directories.
path | The path |
status | status structure containing error code/description in case of failure |
bool gru_path_rename | ( | const char * | filename, |
gru_status_t * | status | ||
) |
Renames a file.
filename | the filename |
status | status structure containing error code/description in case of failure |
bool gru_path_rename_cond | ( | const char * | filename, |
gru_path_cond_t | cond, | ||
gru_status_t * | status | ||
) |
Renames a file based on a condition.
filename | the filename |
cond | condition that must be fulfilled for the rename to occur |
status | status structure containing error code/description in case of failure |