get_name_without_ext_cstr
pub fn get_name_without_ext_cstr(arena: ref allocators.Arena, path: ref u8) ref u8Gets the name of some file path without the file extension.
extern (C, header) fn CreateDirectoryA(path: ref u8, security: ref void) i32 = trust { ... } = "CreateDirectoryA"pub fn get_name_without_ext_cstr(arena: ref allocators.Arena, path: ref u8) ref u8Gets the name of some file path without the file extension.
pub fn get_name_without_ext(arena: ref allocators.Arena, path: str.StringView) ref u8 = trust { ... }View-taking variant of get_name_without_ext_cstr.
pub fn join_cstr(dir: ref u8, name: ref u8) ref u8 = trust { ... }Join dir + "/" + name, returning a heap-allocated str. Does not add a second separator when dir already ends with one.
pub fn join(dir: str.StringView, name: str.StringView) ref u8 = trust { ... }Join two views, returning a newly allocated null-terminated str.
pub fn dir(path: str.StringView) str.StringView = trust { ... }Return the directory part of a path as a view. Returns "." if no separator found.
pub fn dir_cstr(path: ref u8) ref u8 = trust { ... }Return the directory part of a path (everything up to and including last separator). Returns "." if no separator found.
fn has_unc_prefix(path: ref u8, len: i64) bool = trust { ... }Returns the path with all .. or parent references resolved.
pub fn canonicalize_path_cstr(path: ref u8) ref u8 = trust { ... }pub fn canonicalize_path(path: str.StringView) ref u8 = trust { ... }Canonicalize a path held in a view, returning an owned str.
pub fn is_path_sep(c: u8) boolReturns true when c is a path separator on any supported platform.
pub fn path_sep() u8Returns the separator used in PATH-style environment variables.
This is ':' on POSIX systems and ';' on Windows. It is not the same as the separator between path components.
pub fn base_name_cstr(path: ref u8) ref u8 = trust { ... }Returns the final component of a path.
Both '/' and '\\' are accepted as separators. A path consisting only of separators yields an empty str.
pub fn base_name(path: str.StringView) str.StringView = trust { ... }Return the final component of a path as a borrowed view.
fn lower_char(c: u8) u8fn has_exe_suffix(s: ref u8) bool = trust { ... }pub fn normalize_shell_cstr(name: ref u8) ref u8 = trust { ... }Normalize a shell name or shell executable path.
Returns the lower-case base name with any .exe suffix removed, so /bin/Bash, bash, and C:\\Windows\\System32\\BASH.EXE all become bash.
pub fn normalize_shell(name: str.StringView) ref u8 = trust { ... }Normalize a shell name or shell executable path held in a view.
fn is_directory(path: ref u8) bool = trust { ... }fn make_directory(path: ref u8) bool = trust { ... }pub fn ensure_dir_cstr(path: ref u8) bool = trust { ... }Create a directory and all of its missing parent directories.
Returns true when the directory exists after the call. Existing directories are treated as success.
pub fn ensure_dir(path: str.StringView) bool = trust { ... }View-taking variant of ensure_dir_cstr.
pub fn path_contains_dir(target: str.StringView) bool = trust { ... }View-taking variant of path_contains_dir_cstr.
pub fn path_contains_dir_cstr(target: ref u8) bool = trust { ... }Returns true when target is one of the entries in the PATH environment variable.