Skip to content

Commit 6ca508b

Browse files
add mkdir_all (#6)
1 parent 38b618a commit 6ca508b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

async-vfs-os/src/os.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ impl Vfs for OsFs {
179179
Ok(fs::create_dir(self.get_real_path(path)?).await?)
180180
}
181181

182+
async fn mkdir_all(&self, path: &str) -> VfsResult<()> {
183+
Ok(fs::create_dir_all(self.get_real_path(path)?).await?)
184+
}
185+
182186
async fn mv(&self, from: &str, to: &str) -> VfsResult<()> {
183187
Ok(fs::rename(self.get_real_path(from)?, self.get_real_path(to)?).await?)
184188
}

async-vfs/src/vfs.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub trait Vfs: Sync + Send {
3636
async fn cp(&self, from: &str, to: &str) -> VfsResult<()>;
3737
async fn metadata(&self, path: &str) -> VfsResult<Box<dyn VMetadata>>;
3838
async fn mkdir(&self, path: &str) -> VfsResult<()>;
39+
async fn mkdir_all(&self, path: &str) -> VfsResult<()>;
3940
async fn mv(&self, from: &str, to: &str) -> VfsResult<()>;
4041
async fn open(&self, path: &str, options: OpenOptions)
4142
-> VfsResult<Pin<Box<dyn VFile + Send>>>;

0 commit comments

Comments
 (0)