mod buf_reader;
mod buf_writer;
mod dir;
mod file;
mod lines;
mod metadata;
mod open_options;
mod path_ops;
mod read_dir;
pub mod vfs;
#[cfg(all(target_os = "linux", feature = "io-uring"))]
pub mod uring;
pub use buf_reader::BufReader;
pub use buf_writer::BufWriter;
pub use dir::{create_dir, create_dir_all, remove_dir, remove_dir_all};
pub use file::File;
pub use lines::Lines;
pub use metadata::{FileType, Metadata, Permissions};
pub use open_options::OpenOptions;
pub use path_ops::{
canonicalize, copy, hard_link, metadata, read, read_link, read_to_string, remove_file, rename,
set_permissions, symlink_metadata, write, write_atomic,
};
pub use read_dir::{DirEntry, ReadDir, read_dir};
#[cfg(all(target_os = "linux", feature = "io-uring"))]
pub use uring::IoUringFile;
#[cfg(unix)]
pub use path_ops::symlink;
#[cfg(windows)]
pub use path_ops::{symlink_dir, symlink_file};
pub use std::io::SeekFrom;
pub use vfs::{UnixVfs, UnixVfsFile, Vfs, VfsFile};
pub async fn try_exists(path: impl AsRef<std::path::Path>) -> std::io::Result<bool> {
let path = path.as_ref().to_owned();
crate::runtime::spawn_blocking_io(move || path.try_exists()).await
}