dirinfo is a simple command-line tool written in Rust that provides information about the number of files in a specified directory. If no directory path is provided, it defaults to analyzing the current directory.
- Accepts a directory path as input and returns the number of files within it.
- Defaults to the current directory if no path is provided.
- Efficiently handles directory traversal.
To install the tool, you need to have Rust installed on your system. Once Rust is installed, you can build the tool using cargo:
# Clone the repository
$ git clone https://github.com/BalaBoi/dirinfo
# Navigate into the project directory
$ cd dirinfo
# Install the tool
$ cargo install --path .
# Check the tool is installed
$ dirinfo --helpRun the dirinfo command with or without a directory path:
-
Analyze the current directory:
$ dirinfo Number of files: 42
-
Analyze a specific directory:
$ dirinfo /path/to/directory Number of files: 128
- Calculate the total size of files in the directory.
- Provide detailed statistics (e.g., file types, subdirectory counts).
- Add recursive or non-recursive options.
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.