tree
is a command-line utility that recursively displays the directory structure of a given path in a tree-like format, inspired by the Unix tree
command. It is implemented in Rust and aims to provide a fast and efficient alternative with additional features.
-L
flag-f
flag-i
flag-a
flag-P
flag-s
flag-h
flagS-C
flag-n
flag-I
flag-o
flag--filelimit
flagdirsfirst
flagBinaries for various platforms are available on the GitHub Releases (Windows, MacOS, Linux) page.
If you have Rust and Cargo installed, you can build the project by running:
sh
git clone https://github.com/peteretelej/tree.git
cd tree
cargo build --release
The resulting binary will be located at ./target/release/tree.
sh
./tree [FLAGS] [OPTIONS] [PATH]
For example ```sh ./tree -L 2 .
```
```rust use rusttree::tree::{listdirectory, options::TreeOptions};
fn main() { let path = "."; let options = TreeOptions::default(); list_directory(path, &options).unwrap(); } ```
Using this project to learn Rust, so it's not production ready. Feel free to PR for any improvements.
Contributions are welcome! If you have any suggestions, feature requests, or bug reports, please feel free to open an issue or submit a pull request on the GitHub repository.
This project is licensed under the MIT License.