mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
fs: small documentation fixes (#3133)
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
use crate::fs::asyncify;
|
use crate::fs::asyncify;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
/// Copies the contents of one file to another. This function will also copy the permission bits of the original file to the destination file.
|
/// Copies the contents of one file to another. This function will also copy the permission bits
|
||||||
|
/// of the original file to the destination file.
|
||||||
/// This function will overwrite the contents of to.
|
/// This function will overwrite the contents of to.
|
||||||
///
|
///
|
||||||
/// This is the async equivalent of `std::fs::copy`.
|
/// This is the async equivalent of [`std::fs::copy`][std].
|
||||||
|
///
|
||||||
|
/// [std]: fn@std::fs::copy
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
//! `std::io::ErrorKind::WouldBlock` if a *worker* thread can not be converted
|
//! `std::io::ErrorKind::WouldBlock` if a *worker* thread can not be converted
|
||||||
//! to a *backup* thread immediately.
|
//! to a *backup* thread immediately.
|
||||||
//!
|
//!
|
||||||
//! [`AsyncRead`]: https://docs.rs/tokio-io/0.1/tokio_io/trait.AsyncRead.html
|
//! [`AsyncRead`]: trait@crate::io::AsyncRead
|
||||||
|
|
||||||
mod canonicalize;
|
mod canonicalize;
|
||||||
pub use self::canonicalize::canonicalize;
|
pub use self::canonicalize::canonicalize;
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ use std::{io, path::Path};
|
|||||||
/// Creates a future which will open a file for reading and read the entire
|
/// Creates a future which will open a file for reading and read the entire
|
||||||
/// contents into a string and return said string.
|
/// contents into a string and return said string.
|
||||||
///
|
///
|
||||||
/// This is the async equivalent of `std::fs::read_to_string`.
|
/// This is the async equivalent of [`std::fs::read_to_string`][std].
|
||||||
|
///
|
||||||
|
/// [std]: fn@std::fs::read_to_string
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ use std::{io, path::Path};
|
|||||||
/// Creates a future that will open a file for writing and write the entire
|
/// Creates a future that will open a file for writing and write the entire
|
||||||
/// contents of `contents` to it.
|
/// contents of `contents` to it.
|
||||||
///
|
///
|
||||||
/// This is the async equivalent of `std::fs::write`.
|
/// This is the async equivalent of [`std::fs::write`][std].
|
||||||
|
///
|
||||||
|
/// [std]: fn@std::fs::write
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user