# Walk directories up [![Crates.io License](https://img.shields.io/crates/l/walkup)](https://unlicense.org) [![Crates.io Version](https://img.shields.io/crates/v/walkup.svg)](https://crates.io/crates/walkup) [![Crates.io MSRV](https://img.shields.io/crates/msrv/walkup?logo=rust&label=MSRV&labelColor=orange)](https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html) [![Safe Rust](https://img.shields.io/badge/Rust-safe-brightgreen.svg)](https://www.rust-lang.org/policies/safety.html) [![dependency status](https://deps.rs/repo/gitlab/hsn10/walkup/status.svg)](https://deps.rs/repo/gitlab/hsn10/walkup) [![Documentation](https://docs.rs/walkup/badge.svg)](https://docs.rs/walkup) [![Downloads](https://img.shields.io/crates/d/walkup)](https://crates.io/crates/walkup/versions) [![](https://tokei.rs/b1/gitlab/hsn10/walkup?category=code)](https://github.com/XAMPPRocky/tokei) 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 ```rust 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](https://creativecommons.org/publicdomain/zero/1.0/) or the [Unlicense](https://unlicense.org). ![Unlicense logo](https://unlicense.org/pd-icon.png)