Crates.io | walkup |
lib.rs | walkup |
version | 1.0.1 |
source | src |
created_at | 2024-08-06 09:58:43.358717 |
updated_at | 2024-08-06 18:12:51.8245 |
description | Finds a file by walking up the directory tree |
homepage | https://gitlab.com/hsn10/walkup |
repository | https://gitlab.com/hsn10/walkup.git |
max_upload_size | |
id | 1327115 |
size | 18,853 |
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.
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());
}
This is free and unencumbered software released into the public domain.