Crates.io | async-vfs-os |
lib.rs | async-vfs-os |
version | 0.56.0 |
source | src |
created_at | 2021-12-30 23:16:01.675616 |
updated_at | 2023-03-01 18:49:58.972553 |
description | Async Virtual File System backed by OS File System |
homepage | |
repository | https://github.com/prabirshrestha/async-vfs |
max_upload_size | |
id | 505545 |
size | 31,497 |
OS filesystem backed async virtual filesystem for async-vfs.
Supports async-std, smol and tokio runtimes.
Adding dependencies in Cargo.toml
. Use one of the following runtimes.
async-vfs = "x.x.x"
async-vfs-os = { version = "x.x.x", features = ["runtime-async-std"] } # for async-std runtime
async-vfs-os = { version = "x.x.x", features = ["runtime-smol"] } # for smol runtime
async-vfs-os = { version = "x.x.x", features = ["runtime-tokio"] } # for tokio runtime
Code:
use async_vfs::Vfs;
use async_vfs_os::OsFs;
let vfs = OsFs::new("/tmp"); // pass the root.