Expand description
Path Module (STD-004)
Thin wrappers around Rust’s std::path for Ruchy-friendly API.
§Examples
use ruchy::stdlib::path;
// Join paths
let full_path = path::join("/home/user", "documents")?;
// Get file name
let name = path::file_name("/home/user/file.txt")?;
// Get extension
let ext = path::extension("/home/user/file.txt")?;Functions§
- canonicalize
- Canonicalize a path (resolve to absolute, real path)
- components
- Get path components as a vector
- extension
- Get the file extension
- file_
name - Get the file name from a path
- file_
stem - Get the file stem (name without extension)
- is_
absolute - Check if path is absolute
- is_
relative - Check if path is relative
- join
- Join two path components
- join_
many - Join multiple path components
- normalize
- Normalize a path (remove . and .. components)
- parent
- Get the parent directory of a path
- with_
extension - Replace the extension of a path
- with_
file_ name - Replace the file name of a path