Skip to main content

file_operation/
lib.rs

1//! file-operation
2//!
3//! A Rust library providing comprehensive utilities for file operations with both sync/async support.
4//! Includes operations for copy, delete, move, read and write files. Simplifies file handling
5//! in Rust projects with safe and efficient methods for file manipulation and metadata querying.
6
7mod copy;
8mod delete;
9mod file;
10mod r#move;
11mod read;
12mod write;
13
14pub use {copy::*, delete::*, file::*, r#move::*, read::*, write::*};
15
16use std::{
17    error,
18    ffi::OsString,
19    fmt,
20    fs::DirEntry,
21    fs::File,
22    fs::Metadata,
23    fs::OpenOptions,
24    fs::copy,
25    fs::create_dir_all,
26    fs::metadata,
27    fs::read_dir,
28    fs::remove_dir,
29    fs::remove_dir_all,
30    fs::remove_file,
31    fs::rename,
32    io::Error,
33    io::Read,
34    io::Write,
35    path::{Path, PathBuf},
36    pin::Pin,
37    string::FromUtf8Error,
38};
39
40use tokio::{fs::ReadDir, spawn, task::JoinHandle};