async_std/fs/
mod.rs

1//! Filesystem manipulation operations.
2//!
3//! This module is an async version of [`std::fs`].
4//!
5//! [`os::unix::fs`]: ../os/unix/fs/index.html
6//! [`os::windows::fs`]: ../os/windows/fs/index.html
7//! [`std::fs`]: https://doc.rust-lang.org/std/fs/index.html
8//!
9//! # Platform-specific extensions
10//!
11//! * Unix: use the [`os::unix::fs`] module.
12//! * Windows: use the [`os::windows::fs`] module.
13//!
14//! # Examples
15//!
16//! Create a new file and write some bytes to it:
17//!
18//! ```no_run
19//! # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
20//! #
21//! use async_std::fs::File;
22//! use async_std::prelude::*;
23//!
24//! let mut file = File::create("a.txt").await?;
25//! file.write_all(b"Hello, world!").await?;
26//! #
27//! # Ok(()) }) }
28//! ```
29
30pub use dir_builder::DirBuilder;
31pub use dir_entry::DirEntry;
32pub use file::File;
33pub use file_type::FileType;
34pub use metadata::Metadata;
35pub use open_options::OpenOptions;
36pub use permissions::Permissions;
37pub use read_dir::ReadDir;
38
39pub use canonicalize::canonicalize;
40pub use copy::copy;
41pub use create_dir::create_dir;
42pub use create_dir_all::create_dir_all;
43pub use hard_link::hard_link;
44pub use metadata::metadata;
45pub use read::read;
46pub use read_dir::read_dir;
47pub use read_link::read_link;
48pub use read_to_string::read_to_string;
49pub use remove_dir::remove_dir;
50pub use remove_dir_all::remove_dir_all;
51pub use remove_file::remove_file;
52pub use rename::rename;
53pub use set_permissions::set_permissions;
54pub use symlink_metadata::symlink_metadata;
55pub use write::write;
56
57mod canonicalize;
58mod copy;
59mod create_dir;
60mod create_dir_all;
61mod dir_builder;
62mod dir_entry;
63mod file;
64mod file_type;
65mod hard_link;
66mod metadata;
67mod open_options;
68mod permissions;
69mod read;
70mod read_dir;
71mod read_link;
72mod read_to_string;
73mod remove_dir;
74mod remove_dir_all;
75mod remove_file;
76mod rename;
77mod set_permissions;
78mod symlink_metadata;
79mod write;