Crates.io | fs |
lib.rs | fs |
version | 0.0.5 |
source | src |
created_at | 2019-06-07 01:53:48.664408 |
updated_at | 2019-06-07 01:53:48.664408 |
description | A Futures implementation for File System operations |
homepage | |
repository | https://github.com/liuchong/futures-fs |
max_upload_size | |
id | 139531 |
size | 32,336 |
Re-published from [futures-fs](https://github.com/seanmonstar/futures-fs)
, access File System operations off-thread, using Future
s and Stream
s.
let fs = FsPool::default();
// our source file
let read = fs.read("/home/sean/foo.txt", Default::default());
// default writes options to create a new file
let write = fs.write("/home/sean/out.txt", Default::default());
// block this thread!
// the reading and writing however will happen off-thread
read.forward(write).wait()
.expect("IO error piping foo.txt to out.txt");