2 stable releases
1.0.1 | Aug 6, 2024 |
---|
#832 in Filesystem
27 downloads per month
11KB
148 lines
Walk directories up
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.