mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-26 07:25:48 +00:00
Rollup merge of #22353 - tshepang:improve-fs-create-docs, r=alexcrichton
This commit is contained in:
commit
1c8e592bb7
@ -112,10 +112,10 @@ impl File {
|
||||
OpenOptions::new().read(true).open(path)
|
||||
}
|
||||
|
||||
/// Creates a open a file in write-only mode.
|
||||
/// Open a file in write-only mode.
|
||||
///
|
||||
/// This method will attempt to open a new file, truncating it if it already
|
||||
/// exists.
|
||||
/// This function will create a file it it does not exist,
|
||||
/// and will truncate it if it does.
|
||||
///
|
||||
/// See the `OpenOptions::open` function for more details.
|
||||
pub fn create<P: AsPath + ?Sized>(path: &P) -> io::Result<File> {
|
||||
|
Loading…
Reference in New Issue
Block a user