I wrote a File System CLI in Rust
Tags: rust, cli, filesystem
Published: 2024-03-11 18:33:41

## 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:**

    ```bash
    git clone https://github.com/theprantadutta/filefly.git
    ```

2. **Build the Project:**

    ```bash
    cargo build --release
    ```

3. **Run FileFly:**

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

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

## Examples

### Copy

```bash
./target/release/filefly copy -c /path/to/source -d /path/to/destination
```

### Delete

```bash
./target/release/filefly delete -C /path/to/file_or_folder
```

### Replace

```bash
./target/release/filefly replace -C /path/to/source -d /path/to/destination
```

### Synchronize

```bash
./target/release/filefly synchronize -s /path/to/source -d /path/to/destination
```

## 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](https://github.com/theprantadutta/filefly) 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](https://opensource.org/licenses/Apache-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!