file-operation
A Rust library providing a set of utilities for common file operations such as reading, writing, and querying file metadata like size. It aims to simplify file handling in Rust projects, offering safe and efficient file manipulation methods.
Installation
To use this crate, you can run cmd:
cargo add file-operation
Use
use *;
static FILE_DIR: &str = "./log";
static NEW_FILE_DIR: &str = "./new_log";
static NEW_TEST_DIR: &str = "./test_log";
static FILE_PATH: &str = "./log/test.txt";
let _ = write_to_file;
let res: = read_from_file.unwrap_or_default;
let size: = get_file_size;
println!;
println!;
let res: = copy_dir_files;
println!;
let res: = delete_file;
println!;
let res: = move_dir;
println!;
let res: = delete_dir;
println!;
let res: = delete_dir;
println!;
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Contact
For any inquiries, please reach out to the author at ltpp-universe root@ltpp.vip.