hydroperfox-filepaths 1.0.0

Work with flexible file paths
Documentation
  • Coverage
  • 100%
    24 out of 24 items documented5 out of 22 items with examples
  • Size
  • Source code size: 38.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.6 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 29s Average build duration of successful builds.
  • all releases: 29s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • tiamatou/path.rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hydroperx

File Paths

Work with textual file paths, including relativity and resolution. Features:

  • Variant: FlexPath methods consider absolute paths according to the path's FlexPathVariant. Two variants are supported: Common and Windows. The native variant can be deduced directly through _native suffixed methods.

Requirements:

  • The Rust standard library (std).

Example

use hydroperfox_filepaths::FlexPath;

assert_eq!("a", FlexPath::new_common("a/b").resolve("..").to_string());
assert_eq!("a", FlexPath::new_common("a/b/..").to_string());
assert_eq!("a/b/c/d/e", FlexPath::from_n_common(["a/b", "c/d", "e/f", ".."]).to_string());
assert_eq!("../../c/d", FlexPath::new_common("/a/b").relative("/c/d"))