file_io/
lib.rs

1//! [![github]](https://github.com/tamaskis/file_io) [![crates-io]](https://crates.io/crates/file-io) [![docs-rs]](https://docs.rs/file-io)
2//!
3//! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github
4//! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust
5//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
6//!
7//! Easy interfaces for file i/o.
8
9// Linter setup.
10#![warn(missing_docs)]
11
12// Module declarations.
13pub(crate) mod cd;
14pub(crate) mod create;
15pub(crate) mod delete;
16pub(crate) mod load;
17pub(crate) mod modify;
18pub(crate) mod path;
19pub(crate) mod save;
20
21// Re-exports.
22pub use cd::{CdGuard, cd};
23pub use create::{copy_file, create_folder, create_folder_for_file};
24pub use delete::{delete_file, delete_folder};
25pub use load::load_file_as_string;
26pub use modify::{replace_str_in_file, replace_str_in_files};
27pub use path::{
28    get_cwd, get_file_extension, get_file_name, get_file_stem, get_home, get_last_path_component,
29    to_path_buf,
30};
31pub use save::save_string_to_file;
32
33// Helper functions for unit testing.
34#[cfg(test)]
35pub(crate) mod test_utils;