https://github.com/seanmonstar/futures-fs
Access File System operations off-thread, using a Futures.
https://github.com/seanmonstar/futures-fs
futures rust
Last synced: 5 months ago
JSON representation
Access File System operations off-thread, using a Futures.
- Host: GitHub
- URL: https://github.com/seanmonstar/futures-fs
- Owner: seanmonstar
- License: apache-2.0
- Created: 2017-02-24T20:22:32.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-26T11:34:26.000Z (over 6 years ago)
- Last Synced: 2025-05-09T17:05:17.086Z (5 months ago)
- Topics: futures, rust
- Language: Rust
- Homepage: https://docs.rs/futures-fs
- Size: 33.2 KB
- Stars: 69
- Watchers: 5
- Forks: 11
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# futures-fs
[](https://travis-ci.org/seanmonstar/futures-fs)
[](https://crates.io/crates/futures-fs)
[](https://docs.rs/futures-fs)Access File System operations off-thread, using `Future`s and `Stream`s.
## Usage
```rust
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");
```