Welcome to Rust File Reader & Writer Application, a simple yet powerful command-line tool built in Rust for reading from and writing to text files. This project uses Rust's std::fs & std::io modules along with buffered I/O for efficient file handling. Whether you want to quickly append some text or read file contents instantly, this tool gets the job done!
- π Write to File: Add custom text to any file with ease
- π Read from File: Instantly view the contents of your file
- β‘ Buffered I/O: Ensures fast and efficient read/write operations
- π‘ Error Handling: Graceful handling of missing or inaccessible files
- π Any Text File: Works with any
.txtfile or similar text-based format
- π Provide File Path: Run the program with the file path as an argument
- π₯ Choose an Option:
1β Write to file2β Read from file
- β Write Mode: Enter your text and it will be saved into the file
- π Read Mode: Displays the fileβs content or shows βFile is emptyβ if no data exists
- β Error Alerts: If file not found, the program exits with an error message
To run this project locally, follow these steps:
βΆ Step 1: Install Rust β> Download here
βΆ Step 2: Clone this repository:
git clone https://github.com/yourusername/Rust-File-Reader-Writer-Application.git
cd Rust-File-Reader-Writer-ApplicationβΆ Step 3: Build and run the project:
cargo run