| Crates.io | realhydroper-path |
| lib.rs | realhydroper-path |
| version | 1.2.1 |
| created_at | 2025-02-19 13:00:37.541988+00 |
| updated_at | 2025-03-01 18:01:28.366972+00 |
| description | Work with flexible file paths |
| homepage | |
| repository | https://github.com/realhydroper/rustpath |
| max_upload_size | |
| id | 1561298 |
| size | 42,145 |
Work with textual file paths, including relativity and resolution. Features:
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.normalize_path() function, whether they exist or not (does not solve for symlinks and real letter case).Requirements:
std).use realhydroper_path::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"))