Rollup merge of #55621 - GuillaumeGomez:create-dir, r=QuietMisdreavus
Add precision for create_dir function Took me a while to find the other equivalent so it seems to be necessary. r? @QuietMisdreavus
This commit is contained in:
commit
082156b2ac
1 changed files with 7 additions and 0 deletions
|
|
@ -1755,12 +1755,19 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
|
|||
///
|
||||
/// [changes]: ../io/index.html#platform-specific-behavior
|
||||
///
|
||||
/// **NOTE**: If a parent of the given path doesn't exist, this function will
|
||||
/// return an error. To create a directory and all its missing parents at the
|
||||
/// same time, use the [`create_dir_all`] function.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
/// This function will return an error in the following situations, but is not
|
||||
/// limited to just these cases:
|
||||
///
|
||||
/// * User lacks permissions to create directory at `path`.
|
||||
/// * A parent of the given path doesn't exist. (To create a directory and all
|
||||
/// its missing parents at the same time, use the [`create_dir_all`]
|
||||
/// function.)
|
||||
/// * `path` already exists.
|
||||
///
|
||||
/// # Examples
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue