Rust File Manager
File manager, only inside Rust 🦀
rfm is a convenient and intuitive way to interact with files on OS. Function naming is similar to Unix commands (ls, mkdir, mv, rm, cp, touch etc.), so you can easily figure out how to use it.
Installation
Add this to your Cargo.toml:
[]
= "0.5.0"
Usage
For example:
extern crate rfm;
use ;
Functions:
| Function | Description |
|---|---|
| rfm::ls | Read the directory/directories and return the content. dir - takes the path to the directory whose contents you want to retrieve. |
| rfm::clean | Clears the directory/directories of all child files and directories on the passed path. paths - takes a list of paths of what you want to clean. |
| rfm::mkdir | Creates a directory/directories on the passed path. Note, the function creates all missing directories if they occur in the passed parameter. dir_paths - takes a list of paths of what you want to create. |
| rfm::touch | Creates a file/files in the passed path. file_paths - takes a list of paths of what you want to create. |
| rfm::cp | Copies files and directories, including nested files and directories. from - takes a list of paths of what you want to copy. to - destination path. |
| rfm::mv | Moves files and directories, including nested files and directories. from - takes a list of paths of what you want to copy. to - destination path. |
| rfm::rm | Deletes files/directories (including nested files/directories). from - takes a list of paths of what you want to delete. |
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -am "Add some feature" - Push to the branch:
git push origin my-new-feature - Submit a pull request
- Stay Rusty 🦀
License
Made by Dmitry Shatokhin with love ❤️