Module path

Module path 

Source
Expand description

Path manipulation utilities

Windjammer’s path module provides a clean, ergonomic API for working with file system paths. It wraps Rust’s std::path but with simplified error handling.

Structs§

Path
Re-export std::path::Path for direct use A slice of a path (akin to str).
PathBuf
Re-export std::path::PathBuf for direct use
An owned, mutable path (akin to String).

Functions§

as_os_str
Get the path as an OsStr
canonicalize
Normalize a path (resolve . and ..)
components
Get components of the path as strings
current_dir
Get the current working directory
exists
Check if path exists
extension
Get the file extension (works with &str, &String, &Path, &PathBuf)
file_name
Get the file name from a path
file_stem
Get the file stem (name without extension)
from_str
Create a new PathBuf from a string
has_extension
Check if a path has a specific extension
is_absolute
Check if path is absolute
is_dir
Check if path is a directory
is_file
Check if path is a file
is_relative
Check if path is relative
join
Join path segments
new
Create a new Path from a string
parent
Get the parent directory
strip_prefix
Strip prefix from path
to_string
Convert path to string
to_string_lossy
Convert path to string, lossy