Thanks to visit codestin.com
Credit goes to lib.rs

17 stable releases

2.2.0 Sep 14, 2025
2.1.3 Jul 19, 2025
2.1.2 Apr 27, 2024
2.1.1 Feb 6, 2024
0.0.0 May 10, 2019

#829 in Asynchronous

Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

1,288,926 downloads per month
Used in 1,999 crates (83 directly)

Apache-2.0 OR MIT

64KB
512 lines

async-fs

CI 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
~16K SLoC