15 releases

0.2.0-alpha.6 Oct 1, 2019
0.2.0-alpha.4 Aug 29, 2019
0.1.7 Feb 5, 2020
0.1.6 Mar 2, 2019
0.0.0 Feb 1, 2018

#59 in #fs-file

Download history 23721/week @ 2024-03-14 22339/week @ 2024-03-21 26168/week @ 2024-03-28 22188/week @ 2024-04-04 25054/week @ 2024-04-11 23692/week @ 2024-04-18 29181/week @ 2024-04-25 27799/week @ 2024-05-02 31620/week @ 2024-05-09 29543/week @ 2024-05-16 26981/week @ 2024-05-23 31558/week @ 2024-05-30 31847/week @ 2024-06-06 27421/week @ 2024-06-13 25593/week @ 2024-06-20 17590/week @ 2024-06-27

108,470 downloads per month
Used in fewer than 20 crates

MIT license

540KB
10K SLoC

Tokio FS

Asynchronous filesystem manipulation operations (and stdin, stdout, stderr).

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tokio by you, shall be licensed as MIT, without any additional terms or conditions.


lib.rs:

Asynchronous file and standard stream adaptation.

This module contains utility methods and adapter types for input/output to files or standard streams (Stdin, Stdout, Stderr), and filesystem manipulation, for use within (and only within) a Tokio runtime.

Tasks run by worker threads should not block, as this could delay servicing reactor events. Portable filesystem operations are blocking, however. This module offers adapters which use a blocking annotation to inform the runtime that a blocking operation is required. When necessary, this allows the runtime to convert the current thread from a worker to a backup thread, where blocking is acceptable.

Usage

Where possible, users should prefer the provided asynchronous-specific traits such as AsyncRead, or methods returning a Future or Poll type. Adaptions also extend to traits like std::io::Read where methods return std::io::Result. Be warned that these adapted methods may return std::io::ErrorKind::WouldBlock if a worker thread can not be converted to a backup thread immediately. See tokio-executor for more details of the threading model and blocking.

Dependencies

~3MB
~64K SLoC