11 stable releases

1.6.0 Aug 17, 2022
1.5.0 Oct 9, 2020
1.3.0 Sep 14, 2020
1.1.1 Aug 26, 2020
0.0.0 May 10, 2019

#771 in Asynchronous

Download history 26183/week @ 2023-02-07 25788/week @ 2023-02-14 25941/week @ 2023-02-21 25831/week @ 2023-02-28 35990/week @ 2023-03-07 36645/week @ 2023-03-14 42854/week @ 2023-03-21 46630/week @ 2023-03-28 38783/week @ 2023-04-04 46336/week @ 2023-04-11 47135/week @ 2023-04-18 46431/week @ 2023-04-25 43389/week @ 2023-05-02 46549/week @ 2023-05-09 49142/week @ 2023-05-16 40593/week @ 2023-05-23

186,753 downloads per month
Used in 278 crates (28 directly)

Apache-2.0 OR MIT

62KB
520 lines

async-fs

Build License Cargo Documentation

Async filesystem primitives.

This crate is an async version of std::fs.

Implementation

This crate uses blocking to offload blocking I/O onto a thread pool.

Examples

Create a new file and write some bytes to it:

use async_fs::File;
use futures_lite::io::AsyncWriteExt;

let mut file = File::create("a.txt").await?;
file.write_all(b"Hello, world!").await?;
file.flush().await?;

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1MB
~14K SLoC