DEV Community

PRANTA Dutta
PRANTA Dutta

Posted on • Edited on

I wrote a File System CLI in Rust

Introducing FileFly: A Rust Command-Line Utility for Efficient File Operations.

I'm excited to introduce FileFly, a versatile Rust command-line utility designed to simplify and streamline various file and folder operations. Whether you're copying files, deleting folders, replacing files, or synchronizing directories, FileFly has got you covered. Now, that was a bit misleading, it's nothing fancy, I was trying out rust, so, I just created a Rust CLI with clap that can do some file operations.

FileFly Features

1. Built with Rust

FileFly is built with Rust. It optimizes file and folder operations, making them faster and more reliable. With progress tracking and logging features, you can monitor the status of ongoing tasks and troubleshoot any issues that arise.

2. Progress Tracking

Say goodbye to wondering how much time a file operation will take. FileFly provides clear progress bars, keeping you informed about the status of your tasks. Watch as files are copied, deleted, or replaced, and stay in control of your data.

3. Logging Capabilities

FileFly logs every step of the way. Successes, errors, and informational messages are captured, providing a comprehensive record of your file operations. This logging feature helps you identify and resolve issues quickly. That said, I understand they may be a little ugly at times, if you have a lot of file operations, so in future, we will add a flag that can disable logging completely.

4. Directory Synchronization

Keeping directories in sync has never been easier. The synchronize command ensures that both the source and destination directories are identical. It intelligently copies missing files and deletes extraneous ones, maintaining consistency effortlessly.

Getting Started with FileFly

Installation

To get started with FileFly, follow these simple steps:

  1. Clone the Repository:

    git clone https://github.com/theprantadutta/filefly.git
    
  2. Build the Project:

    cargo build --release
    
  3. Run FileFly:

    Explore the variety of commands FileFly offers, such as copy, delete, replace, and synchronize. For example:

    ./target/release/filefly copy -c source_path -d destination_path
    

Examples

Copy

./target/release/filefly copy -c /path/to/source -d /path/to/destination
Enter fullscreen mode Exit fullscreen mode

Delete

./target/release/filefly delete -C /path/to/file_or_folder
Enter fullscreen mode Exit fullscreen mode

Replace

./target/release/filefly replace -C /path/to/source -d /path/to/destination
Enter fullscreen mode Exit fullscreen mode

Synchronize

./target/release/filefly synchronize -s /path/to/source -d /path/to/destination
Enter fullscreen mode Exit fullscreen mode

Contribute to FileFly

Any contributions are welcomed from the community. Whether you want to report an issue, suggest an enhancement, or contribute code, your input is valuable. Visit the GitHub repository to get involved. Also, I am a noob in Rust, so be gentle, please, my codes might be pretty trash.

License

FileFly is open-source and licensed under the Apache License 2.0. Feel free to use, modify, and distribute it according to the terms of the Apache License.

Your contributions and feedback are always appreciated. Let FileFly take your file operations to new heights. Download it, try it out, and let us know what you think. Happy flying!

Top comments (0)