Crates.io | walkup |
lib.rs | walkup |
version | 1.0.2 |
created_at | 2024-08-06 09:58:43.358717+00 |
updated_at | 2025-05-24 13:36:59.476394+00 |
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 | 24,616 |
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.
This code can be used under terms of CC0 or the Unlicense.