bool path_is_directory(const string& path) { path_stat_t st; if(path_stat(path, &st) != 0) { return false; } return S_ISDIR(st.st_mode); }
uint64_t path_modified_time(const string& path) { path_stat_t st; if(path_stat(path, &st) != 0) { return 0; } return st.st_mtime; }
size_t path_file_size(const string& path) { path_stat_t st; if(path_stat(path, &st) != 0) { return -1; } return st.st_size; }
int32_t path_get_size(const char *path) { int32_t filesize = 0; if (path_stat(path, IS_VALID, &filesize)) return filesize; return -1; }
bool path_is_valid(const char *path) { return path_stat(path, IS_VALID); }
bool path_is_character_special(const char *path) { return path_stat(path, IS_CHARACTER_SPECIAL); }
/** * path_is_directory: * @path : path * * Checks if path is a directory. * * Returns: true (1) if path is a directory, otherwise false (0). */ bool path_is_directory(const char *path) { return path_stat(path, IS_DIRECTORY); }