Skip to content

Commit 43217fe

Browse files
authored
Update fs.rs
Add aliases for create_dir, create_dir_all, remove_dir, remove_dir_all
1 parent 7014963 commit 43217fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/std/src/fs.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,6 +1907,7 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
19071907
/// Ok(())
19081908
/// }
19091909
/// ```
1910+
#[doc(alias = "mkdir")]
19101911
#[stable(feature = "rust1", since = "1.0.0")]
19111912
pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
19121913
DirBuilder::new().create(path.as_ref())
@@ -1951,6 +1952,7 @@ pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
19511952
/// Ok(())
19521953
/// }
19531954
/// ```
1955+
#[doc(alias = "mkdir")]
19541956
#[stable(feature = "rust1", since = "1.0.0")]
19551957
pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
19561958
DirBuilder::new().recursive(true).create(path.as_ref())
@@ -1986,6 +1988,8 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
19861988
/// Ok(())
19871989
/// }
19881990
/// ```
1991+
#[doc(alias = "rm")]
1992+
#[doc(alias = "rmdir")]
19891993
#[doc(alias = "delete")]
19901994
#[stable(feature = "rust1", since = "1.0.0")]
19911995
pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
@@ -2024,6 +2028,8 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
20242028
/// Ok(())
20252029
/// }
20262030
/// ```
2031+
#[doc(alias = "rm")]
2032+
#[doc(alias = "rmdir")]
20272033
#[doc(alias = "delete")]
20282034
#[stable(feature = "rust1", since = "1.0.0")]
20292035
pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {

0 commit comments

Comments
 (0)