Skip to content

Commit 6df8e6f

Browse files
authored
Rollup merge of rust-lang#41007 - pgerber:dir_builder, r=frewsxcv
Improve documentation for `std::fs::DirBuilder`
2 parents db6b4e7 + ff4febf commit 6df8e6f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/libstd/fs.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1726,9 +1726,9 @@ impl DirBuilder {
17261726
}
17271727
}
17281728

1729-
/// Indicate that directories create should be created recursively, creating
1730-
/// all parent directories if they do not exist with the same security and
1731-
/// permissions settings.
1729+
/// Indicates that directories should be created recursively, creating all
1730+
/// parent directories. Parents that do not exist are created with the same
1731+
/// security and permissions settings.
17321732
///
17331733
/// This option defaults to `false`.
17341734
///
@@ -1749,6 +1749,9 @@ impl DirBuilder {
17491749
/// Create the specified directory with the options configured in this
17501750
/// builder.
17511751
///
1752+
/// It is considered an error if the directory already exists unless
1753+
/// recursive mode is enabled.
1754+
///
17521755
/// # Examples
17531756
///
17541757
/// ```no_run

0 commit comments

Comments
 (0)