diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2016-07-26 17:21:12 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-26 17:21:12 -0400 |
| commit | ae05e62ede83a8bfa8f71b348a340bc89a02b16a (patch) | |
| tree | 43e2d9c87ca316b5dac824433a972368fcd91dc9 /src/libstd/sys | |
| parent | 96108bbb947f24c3c278f56b4f81ea90ea65d5a0 (diff) | |
| parent | 90bb8d469c495f48cf0da67c7811fd887a8b0655 (diff) | |
| download | rust-ae05e62ede83a8bfa8f71b348a340bc89a02b16a.tar.gz rust-ae05e62ede83a8bfa8f71b348a340bc89a02b16a.zip | |
Rollup merge of #34995 - GuillaumeGomez:dir_builder_doc, r=steveklabnik
Add DirBuilder doc examples r? @steveklabnik Part of #29329 and of #29356.
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/ext/fs.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs index bb90a977433..d1f26fec249 100644 --- a/src/libstd/sys/unix/ext/fs.rs +++ b/src/libstd/sys/unix/ext/fs.rs @@ -239,6 +239,16 @@ pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<()> pub trait DirBuilderExt { /// Sets the mode to create new directories with. This option defaults to /// 0o777. + /// + /// # Examples + /// + /// ```ignore + /// use std::fs::DirBuilder; + /// use std::os::unix::fs::DirBuilderExt; + /// + /// let mut builder = DirBuilder::new(); + /// builder.mode(0o755); + /// ``` #[stable(feature = "dir_builder", since = "1.6.0")] fn mode(&mut self, mode: u32) -> &mut Self; } |
