diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-07-23 01:57:21 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-07-23 01:57:21 +0200 |
| commit | 90bb8d469c495f48cf0da67c7811fd887a8b0655 (patch) | |
| tree | dfe676ba7c6ea878bbabc7828ddcac0924a6b1e6 /src/libstd/sys | |
| parent | fd1d3603d46422bef6531a2d74401361ba1d822b (diff) | |
| download | rust-90bb8d469c495f48cf0da67c7811fd887a8b0655.tar.gz rust-90bb8d469c495f48cf0da67c7811fd887a8b0655.zip | |
Add DirBuilder doc examples
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; } |
