walkup

Crates.iowalkup
lib.rswalkup
version1.0.1
sourcesrc
created_at2024-08-06 09:58:43.358717
updated_at2024-08-06 18:12:51.8245
descriptionFinds a file by walking up the directory tree
homepagehttps://gitlab.com/hsn10/walkup
repositoryhttps://gitlab.com/hsn10/walkup.git
max_upload_size
id1327115
size18,853
Radim Kolar (hsn10)

documentation

https://docs.rs/walkup

README

Walk directories up

Crates.io License Crates.io Version Crates.io MSRV Safe Rust dependency status Documentation Downloads

Finds a file by walking up the directory tree until the file is found or root is reached. Name must point to a file, not directory and file must be readable.

How to use

use walkup::walk_up;
// parameters are: start directory, file name
let res = walk_up ( "/usr/src/usr.bin/aucat/", "Makefile.inc" );
if let Some(path) = res {
   println!("Makefile.inc found at {}", path.display());
}

License

This is free and unencumbered software released into the public domain.

This code can be used under terms of CC0 or the Unlicense.

Unlicense logo

Commit count: 0

cargo fmt