Crate proper_path_tools

Source
Expand description

§Module :: proper_path_tools

experimental rust-status docs.rs discord

Collection of algorithms and structures to handle paths properly.

All functions in the crate don’t touch file system, but only process paths.

Modules§

  • Exposed namespace of the module.
  • Orphan namespace of the module.
  • Own namespace of the module.
  • Basic functionality.
  • Prelude to use essentials: use my_module::prelude::*.
  • Transitive TryFrom and TryInto.

Structs§

Traits§

Functions§

  • Returns the canonical, absolute form of the path with all intermediate components normalized and symbolic links resolved. This function does not touch fs.
  • Replaces the existing path extension with the provided extension.
  • Extracts the extension from the given path.
  • Extracts multiple extensions from the given path.
  • Determines if a given path string contains unescaped glob pattern characters.
  • Joins a list of file system paths into a single absolute path.
  • Normalizes a given filesystem path by syntactically removing occurrences of . and properly handling .. components.
  • Finds the common directory path among a collection of paths.
  • Computes the relative path from one path to another.
  • Rebase the file path relative to a new base path, optionally removing a common prefix.
  • Generates a unique folder name using the current system time, process ID, thread ID, and an internal thread-local counter.
  • Extracts the parent directory and file stem (without extension) from the given path.