use-file-name 0.0.1

Practical file-name utility primitives
Documentation
  • Coverage
  • 90.91%
    10 out of 11 items documented1 out of 10 items with examples
  • Size
  • Source code size: 8.85 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 355.53 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Documentation
  • RustUse/use-fs
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-file-name

Practical file-name utility primitives for RustUse.

Experimental

use-file-name is experimental while the use-fs workspace remains below 0.3.0.

Example

use use_file_name::{is_hidden_file_name, sanitize_file_name};

assert!(is_hidden_file_name(".gitignore"));
assert_eq!(sanitize_file_name("report?.txt"), "report-.txt");

Scope

  • file-name extraction from path-like input
  • reserved-name detection
  • unsafe-character handling
  • lightweight sanitization and normalization

Non-goals

  • locale-aware transliteration
  • filesystem I/O
  • universal security guarantees across all filesystems

License

Licensed under either of the following, at your option:

  • Apache License, Version 2.0
  • MIT license