FSFileStat
typedef struct{
size_t size;
time_t creation_time;
time_t modification_time;
uint32_t permissions;
}FSFileStat;
typedef struct{
size_t size;
time_t creation_time;
time_t modification_time;
uint32_t permissions;
}FSFileStat;
typedef struct XFSTime{
int year;
int month;
int day;
int hour;
int minute;
int second;
}XFSTime;
Retrieve the creation time of a file or directory.
X_FILESYSTEM_API bool x_fs_file_creation_time(
const char *path,
time_t *out_time
);
const char *pathtime_t *out_timeTrue on success, false on failure.
Retrieve the last modification time of a file or directory.
X_FILESYSTEM_API bool x_fs_file_modification_time(
const char *path,
time_t *out_time
);
const char *pathtime_t *out_timeTrue on success, false on failure.
Retrieve permissions metadata for a file or directory.
X_FILESYSTEM_API bool x_fs_file_permissions(
const char *path,
uint32_t *out_permissions
);
const char *pathuint32_t *out_permissionsTrue on success, false on failure.
Set permissions metadata for a file or directory.
X_FILESYSTEM_API bool x_fs_file_set_permissions(
const char *path,
uint32_t permissions
);
const char *pathuint32_t permissionsTrue on success, false on failure.
Retrieve metadata about a file or directory.
X_FILESYSTEM_API bool x_fs_file_stat(
const char *path,
FSFileStat *out_stat
);
const char *pathFSFileStat *out_statTrue on success, false on failure.
Check whether a path points to an existing directory.
X_FILESYSTEM_API bool x_fs_is_directory(const char *path);
const char *pathTrue if it is a directory, false otherwise.
Check whether a path points to an existing regular file.
X_FILESYSTEM_API bool x_fs_is_file(const char *path);
const char *pathTrue if it is a file, false otherwise.
Convert a time value from epoch to XFSTime.
X_FILESYSTEM_API XFSTime x_fs_time_from_epoch(time_t t);
time_t tXFSTime representation of the given epoch time.