x_fs_directory_parent
Coputes the parent of path and write it into out.
X_FILESYSTEM_API void x_fs_directory_parent(
const XFSPath *path,
XFSPath *out
);
Parameters
Returns
void
Coputes the parent of path and write it into out.
X_FILESYSTEM_API void x_fs_directory_parent(
const XFSPath *path,
XFSPath *out
);
void
X_FILESYSTEM_API size_t x_fs_path_basename(
const XFSPath *input,
XFSPath *out
);
X_FILESYSTEM_API XSlice x_fs_path_basename_as_slice(const XFSPath *input);
Get the basename (final component) from a path string.
X_FILESYSTEM_API XSlice x_fs_path_basename_cstr(const char *input);
const char *inputSlice pointing into input containing the basename.
Replace or set the extension of a path.
X_FILESYSTEM_API size_t x_fs_path_change_extension(
XFSPath *path,
const char *new_ext
);
XFSPath *pathconst char *new_extNew length of the path after the change.
X_FILESYSTEM_API size_t x_fs_path_dirname(
const XFSPath *input,
XFSPath *out
);
X_FILESYSTEM_API XSlice x_fs_path_dirname_as_slice(const XFSPath *input);
Get the directory name (everything before the final component) from a path string.
X_FILESYSTEM_API XSlice x_fs_path_dirname_cstr(const char *input);
const char *inputSlice pointing into input containing the directory portion.
X_FILESYSTEM_API size_t x_fs_path_extension(
const XFSPath *input,
XFSPath *out
);
X_FILESYSTEM_API XSlice x_fs_path_extension_as_slice(const XFSPath *input);
Get the extension from a path string.
X_FILESYSTEM_API XSlice x_fs_path_extension_cstr(const char *input);
const char *inputSlice pointing into input containing the extension (may be empty).
Split a path string into components.
X_FILESYSTEM_API bool x_fs_path_split(
const char *input,
XFSPath *out_components,
size_t max_components,
size_t *out_count
);
const char *inputXFSPath *out_componentssize_t max_componentssize_t *out_countTrue on success, false on failure.
X_FILESYSTEM_API size_t x_fs_path_stem(
const XFSPath *input,
XFSPath *out
);
X_FILESYSTEM_API XSlice x_fs_path_stem_as_slice(const XFSPath *input);
Get the filename stem (basename without extension) from a path string.
X_FILESYSTEM_API XSlice x_fs_path_stem_cstr(const char *input);
const char *inputSlice pointing into input containing the stem.