mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
Filesystem manipulation APIs. (#323)
This patch adds a new crate: tokio-fs. This crate provides a wrapper around `std` functionality that can only be performed using blocking operations. This primarily includes filesystem operations, but it also includes standard input, output, and error access as these streams cannot be safely switched to non-blocking mode in a portable way. These wrappers call the `std` functions from within a `blocking` annotation which allows the runtime to compensate for the fact that the thread will potentially remain blocked in a system call.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
//! Asynchronous filesystem manipulation operations.
|
||||
//!
|
||||
//! This module contains basic methods and types for manipulating the contents
|
||||
//! of the local filesystem from within the context of the Tokio runtime.
|
||||
//!
|
||||
//! Unlike *most* other Tokio APIs, the filesystem APIs **must** be used from
|
||||
//! the context of the Tokio runtime as they require Tokio specific features to
|
||||
//! function.
|
||||
|
||||
pub use tokio_fs::{
|
||||
file,
|
||||
File,
|
||||
};
|
||||
Reference in New Issue
Block a user