Struct in stdx_filesystem.h

FSFileStat

typedef struct{
  size_t size;
  time_t creation_time;
  time_t modification_time;
  uint32_t permissions;
}FSFileStat;
Struct in stdx_filesystem.h

XFSTime

typedef struct XFSTime{
  int year;
  int month;
  int day;
  int hour;
  int minute;
  int second;
}XFSTime;
Function in stdx_filesystem.h

x_fs_file_creation_time

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
);

Parameters

const char *path
File or directory path.
time_t *out_time
Output time receiving the creation time.

Returns

True on success, false on failure.

Function in stdx_filesystem.h

x_fs_file_modification_time

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
);

Parameters

const char *path
File or directory path.
time_t *out_time
Output time receiving the modification time.

Returns

True on success, false on failure.

Function in stdx_filesystem.h

x_fs_file_permissions

Retrieve permissions metadata for a file or directory.

X_FILESYSTEM_API bool x_fs_file_permissions(
 const char *path,
 uint32_t *out_permissions
);

Parameters

const char *path
File or directory path.
uint32_t *out_permissions
Output value receiving the permissions (platform-dependent).

Returns

True on success, false on failure.

Function in stdx_filesystem.h

x_fs_file_set_permissions

Set permissions metadata for a file or directory.

X_FILESYSTEM_API bool x_fs_file_set_permissions(
 const char *path,
 uint32_t permissions
);

Parameters

const char *path
File or directory path.
uint32_t permissions
Permissions value to set (platform-dependent).

Returns

True on success, false on failure.

Function in stdx_filesystem.h

x_fs_file_stat

Retrieve metadata about a file or directory.

X_FILESYSTEM_API bool x_fs_file_stat(
 const char *path,
 FSFileStat *out_stat
);

Parameters

const char *path
File or directory path.
FSFileStat *out_stat
Output struct receiving the metadata.

Returns

True on success, false on failure.

Function in stdx_filesystem.h

x_fs_is_directory

Check whether a path points to an existing directory.

X_FILESYSTEM_API bool x_fs_is_directory(const char *path);

Parameters

const char *path
Path to check.

Returns

True if it is a directory, false otherwise.

Function in stdx_filesystem.h

x_fs_is_file

Check whether a path points to an existing regular file.

X_FILESYSTEM_API bool x_fs_is_file(const char *path);

Parameters

const char *path
Path to check.

Returns

True if it is a file, false otherwise.

Function in stdx_filesystem.h

x_fs_time_from_epoch

Convert a time value from epoch to XFSTime.

X_FILESYSTEM_API XFSTime x_fs_time_from_epoch(time_t t);

Parameters

time_t t
Time in seconds since Unix epoch.

Returns

XFSTime representation of the given epoch time.