ds-rs

Crates.iods-rs
lib.rsds-rs
version0.1.0
sourcesrc
created_at2023-06-01 00:22:49.46955
updated_at2023-06-01 00:22:49.46955
descriptionA command to search and display directory structures.
homepage
repositoryhttps://github.com/mysteriouslyseeing/directory-search-rs
max_upload_size
id879336
size16,368
Will Schroeder (mysteriouslyseeing)

documentation

README

ds-rs

Usage

To run ds-rs, use the command ds:

> ds --help
A command to search and display directory structures.

Usage: ds.exe [OPTIONS]

Options:
  -p, --path <PATH>    The path at which to start. If unspecified, the current directory is used.
  -r, --recursive      Enables recursion
  -d, --depth <DEPTH>  The depth to which to recurse. If unspecified, the depth is unlimited.
  -f, --show-files     Displays files along with directories
  -s, --show-symlinks  Displays symlinks along with directories
  -h, --help           Print help
  -V, --version        Print version

Examples

Display the directories inside a directory

> ds --path "C:/Users/%USERNAME%/Documents"
Displaying contents of "C:/Users/%USERNAME%/Documents"
="Github"
="Projects"

Display the entire contents of a directory

> ds --path "C:/Users/%USERNAME%/Documents" -f -s
Displaying contents of "C:/Users/%USERNAME%/Documents"
="GitHub"
="Projects"
-"Resume.docx"
-"Resume.pdf"

Display the entire contents of a directory recursively up to a depth of 3:

> ds --path "C:/Users/%USERNAME%/Documents" -r --depth 3 -f -s
Displaying contents of "C:/Users/%USERNAME%/Documents"
="GitHub"
="Projects"
 ="Python"
  ="python_project_1"
  ="python_project_2"
  -"python_script.py"
 ="Rust"
  ="directory-search-rs"
  -"new_bin_and_lib.bat"
-"Resume.docx"
-"Resume.pdf"

Installation

cargo install

The easiest way to install this binary is through cargo install:

cargo install ds-rs

Build from source

To build from source, clone the git repository, build with cargo, and move the binary to a stable folder.

> git clone https://github.com/mysteriouslyseeing/directory-search-rs
> cd directory-search-rs
> cargo build --release
> cp ./target/release/ds /path/to/destination/
Commit count: 4

cargo fmt