Rollup merge of #86839 - D1mon:patch-1, r=JohnTitor

Add doc aliases to fs.rs

Add aliases for create_dir, create_dir_all, remove_dir, remove_dir_all
This commit is contained in:
Yuki Okushi 2021-07-29 06:11:43 +09:00 committed by GitHub
commit 87c9f32dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1912,6 +1912,7 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
/// Ok(())
/// }
/// ```
#[doc(alias = "mkdir")]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
DirBuilder::new().create(path.as_ref())
@ -1991,6 +1992,7 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
/// Ok(())
/// }
/// ```
#[doc(alias = "rmdir")]
#[stable(feature = "rust1", since = "1.0.0")]
pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
fs_imp::rmdir(path.as_ref())