Function in stdx_filesystem.h

x_fs_cwd_get

Get the current working directory.

X_FILESYSTEM_API size_t x_fs_cwd_get(XFSPath *path);

Parameters

XFSPath *path
Output path buffer to receive the current working directory.

Returns

Length of the written path (in bytes/chars, excluding terminator), or 0 on failure.

Function in stdx_filesystem.h

x_fs_cwd_set

Set the current working directory.

X_FILESYSTEM_API size_t x_fs_cwd_set(const char *path);

Parameters

const char *path
New working directory path.

Returns

Non-zero on success, 0 on failure.

Function in stdx_filesystem.h

x_fs_cwd_set_from_executable_path

Set the current working directory to the executable's directory.

X_FILESYSTEM_API size_t x_fs_cwd_set_from_executable_path(void);

Returns

Non-zero on success, 0 on failure.