| Crates.io | simpath |
| lib.rs | simpath |
| version | 2.5.0 |
| created_at | 2018-02-11 11:29:42.379379+00 |
| updated_at | 2023-07-31 16:20:49.542847+00 |
| description | Search for files on a path defined in an environment variable |
| homepage | https://github.com/andrewdavidmackenzie/simpath/README.md |
| repository | https://github.com/andrewdavidmackenzie/simpath/ |
| max_upload_size | |
| id | 50652 |
| size | 33,834 |
A small and simple crate (in the spirit of my "simp*" crates) for search paths, like $PATH and $LD_PATH.
Create a Simpath that loads from the $PATH environment variable using:
let path = simppath::new("PATH");
Then find a file called filename by searching the directories in PATH in order - as a PathBuf
let file = path.find("filename");
The following platforms are supported and tested in CI
FileType in the pathThese methods are activated by the "urls" feature, which is included by default.
To remove that code and dependencies disable all default features using the cargo command line option
--no-default-features or including default-features = false in your Cargo.toml section for Simpath
FileType in the pathfmt::Display traitCloneDebugA simple Makefile exists that builds, runs clippy and then runs tests.
Just type make at the command prompt.