Skip to content

A Rust path library with quirks that is as platform-agnostic as possible

License

Notifications You must be signed in to change notification settings

lonelyhentxi/quirks-path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


version-badge docs-badge

A Rust path library with quirks that is as platform-agnostic as possible.

Quick Start

Install

cargo install quirks-path

Import

use quirks_path::{ Path, PathBuf };

FAQ

1. Why create a quirky path library?

Forked from std::path, the library provides as much cross-platform path manipulation capability as possible.

One major use case is serving as an intermediary server: receiving path data from clients, performing path operations, and then forwarding it to a third party service (with the third party's system platform determined solely by the client).

2. Support List

  • *nix Paths (without /): /bin/sh
  • Windows Verbatim: \\?\cat_pics
  • Windows Verbatim UNC: \\?\UNC\server\share
  • Windows Verbatim Disk: \\?\C:
  • Windows DeviceNS: \\.\COM42
  • Windows UNC: \\server\share
  • Windows Disk: C:

3. Quirks

  • Think any of / or \ be a seperator or special mark

  • Prefer think paths that not have verbatim prefix and start with / be *nix-like root paths

  • Prefer think paths start with drive as windows drive paths, and if not contains / sep then default use \ sep

  • When call absolute method it will not trim components trailing space and dots (windows style) and not remove parent ..

  • Prefer think paths that not have verbatim prefix and start with \ be *windows-like root paths

  • Lack of extra information, think COM1 as relative path

About

A Rust path library with quirks that is as platform-agnostic as possible

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages