Expand description
§nu-path
This crate takes care of path handling in Nushell, such as canonicalization and component expansion, as well as other path-related utilities.
Re-exports§
pub use expansions::canonicalize_with;
pub use expansions::expand_path_with;
pub use expansions::expand_to_real_path;
pub use expansions::locate_in_dirs;
Modules§
Macros§
Structs§
- An iterator over
Path
and its ancestors. - A wrapper around
std::path::Path
with extra invariants determined by itsForm
. - A wrapper around
std::path::PathBuf
with extra invariants determined by itsForm
.
Functions§
- Return the cache directory for the current platform or XDG_CACHE_HOME if specified.
- Like
Path::components()
, but produces an extra empty component at the end whenpath
contains a trailing slash. - Return the data directory for the current platform or XDG_DATA_HOME if specified.
- Expand tilde (“~”) into a home directory if it is the first path component
true
if the path has a trailing slash, including if it’s the root directory.- Return the nushell config directory.
- Strip any trailing slashes from a non-root path. This is required in some contexts, for example for the
PWD
environment variable.
Type Aliases§
- A path that is strictly absolute.
- A path buf that is strictly absolute.
- An absolute, canonical path.
- An absolute, canonical path buf.
- A path that is strictly relative.
- A path buf that is strictly relative.