| Crates.io | futures-fs |
| lib.rs | futures-fs |
| version | 0.0.5 |
| created_at | 2017-02-23 18:47:08.975291+00 |
| updated_at | 2018-10-09 19:47:45.38874+00 |
| description | A Futures implementation for File System operations |
| homepage | |
| repository | https://github.com/seanmonstar/futures-fs |
| max_upload_size | |
| id | 8654 |
| size | 32,291 |
Access File System operations off-thread, using Futures and Streams.
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");