Registry / async / async-fs

async-fs

JSON →
library2.2.0rscratesunverified

Async filesystem primitives for reading, writing, and managing files and directories.

# Cargo.toml [dependencies] async-fs = "2.2.0"
INSTALL
IMPORT
SIG · ASYNC-FS
A
async-fs
asyncrustv2.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

File
use async_fs::File;

Create and write to a file asynchronously

use async_fs::File; use async_io::block_on; block_on(async { let mut file = File::create("hello.txt").await.unwrap(); file.write_all(b"Hello, world!").await.unwrap(); });
Debug
Known issues
gotchaRequires an async runtime (e.g., `async-io`, `smol`, or `tokio`)
fix
Add an async runtime dependency and use `block_on` or `#[tokio::main]`
affects: >=2.0.0
Upgrade
Version history
2.2.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
42 hits · last 30 days
node
36
OpenAI (training)
1
Resources
async-fs — cargo add async-fs · libregistry