doc: fix and expand File::create explanation
This commit is contained in:
parent
b63cee4a11
commit
3e9e32573e
1 changed files with 3 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue