#file-path #path #utf-8 #unicode

komichi

Application tools for working with file-system paths

3 stable releases

new 2.0.0 Feb 21, 2025
1.0.3 Apr 1, 2024
1.0.2 Mar 25, 2024
0.2.0 Mar 20, 2024
0.1.0 Mar 13, 2024

#390 in Filesystem

Download history 2/week @ 2024-12-04 2/week @ 2024-12-11

389 downloads per month

MIT/Apache

110KB
2K SLoC

小道 Komichi

Application tools for working with file-system paths.


lib.rs:

小道 Komichi

komichi is a collection of tools to make working with file-system paths more convenient.

Features

Some notable features of komichi:

  • Uses camino paths so that an application, using this crate, can treat paths like normal Rust string-like types.
  • EnvVal provides the ability to retrieve environment variable values and use a default value if the environment variable does NOT exist or have a value.
  • ExpandPath provides a relatively-fast ability to expand unicode-paths that:
    • may contain BASH-like variables; and
    • may start with a tilde; and
    • may not be absolute.
  • ExpandText provides a relatively-fast ability to expand given text or text from a file that:
    • may contain BASH-like curly-bracket variables (aka identifiers)
  • LocalDirectories can provide application local ($HOME) path directory locations for:
    • cache files
    • config files
    • data files
    • log files
    • state files
  • SystemDirectories can provide application system path directories locations for:
    • system application cache files
    • system application config files
    • system application data files
    • system application log files
    • system application state files
    • system application install files

Dependencies

~0.7–7.5MB
~57K SLoC