Standard Library
std.path
Path manipulation utilities for working with file paths.
Exported functions
pub def join(parts: List[String]) -> String
Join path components into a single path.
pub def split(file_path: String) -> List[String]
Split a path into its components.
pub def dirname(file_path: String) -> String
Get the directory part of a path.
pub def basename(file_path: String) -> String
Get the filename part of a path.
pub def extension(file_path: String) -> String
Get the extension of a path.
pub def normalize(file_path: String) -> String
Normalize a path by resolving redundant separators and dot segments.
pub def absolute(file_path: String) -> String
Resolve a path to an absolute path using the current working directory.
pub def absolute_from(file_path: String, base_path: String) -> String
Resolve a path to an absolute path using an explicit base directory.
pub def relative(target_path: String, base_path: String) -> String
Compute the relative path from a base location to a target.
pub def is_absolute(file_path: String) -> Bool
Return true when a path is absolute.
pub def separator() -> String
Return the platform-specific path separator.
pub def parent(file_path: String) -> String
Alias for dirname().
pub def stem(file_path: String) -> String
Return the file name without its final extension.