Skip to main content

Module path

Module path 

Source
Expand description

Functions for working with Path.

Functionsยง

canonicalize
Returns the canonical, absolute form of a path with all intermediate components normalized.
expand
Performs substitution of ~ and environment variables, see env::expand and expand_tilde
expand_tilde
Expands tilde ~ into users home directory if available, otherwise returns the path unchanged.
find_paths
Returns an iterator of the byte ranges in src that contain a path.
fold_home_dir
Replaces users home directory from path with tilde ~ if the directory is available, otherwise returns the path unchanged.
get_path_suffix
If src ends with a path then this function returns the part of the slice.
get_relative_path
Convert path into a relative path
get_truncated_path
Returns a truncated filepath where the basepart of the path is reduced to the first char of the folder and the whole filename appended.
home_dir
A convenience function that wraps the home_dir function from the standard library.
normalize
Normalize a path without resolving symlinks.