Skip to content

Commit 387cd6d

Browse files
D1monJohnTitor
authored andcommitted
Add some doc aliases
Add `mkdir` to `create_dir`, `rmdir` to `remove_dir`.
1 parent eba3228 commit 387cd6d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/fs.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1912,6 +1912,7 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
19121912
/// Ok(())
19131913
/// }
19141914
/// ```
1915+
#[doc(alias = "mkdir")]
19151916
#[stable(feature = "rust1", since = "1.0.0")]
19161917
pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
19171918
DirBuilder::new().create(path.as_ref())
@@ -1991,6 +1992,7 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
19911992
/// Ok(())
19921993
/// }
19931994
/// ```
1995+
#[doc(alias = "rmdir")]
19941996
#[stable(feature = "rust1", since = "1.0.0")]
19951997
pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
19961998
fs_imp::rmdir(path.as_ref())

0 commit comments

Comments
 (0)