use super::{Mount, RMDIR3args, Result, diropargs3, filename3, nfs_fh3};
use crate::split_path;
use bytes::Bytes;
#[allow(unused)]
impl Mount {
pub async fn rmdir_path(&self, path: &str) -> Result<()> {
let (dir, dirname) = split_path(path)?;
let dir_fh = self.lookup_path(&dir).await?.fh;
self.rmdir(dir_fh, &dirname).await
}
pub async fn rmdir(&self, dir_fh: Bytes, dirname: &str) -> Result<()> {
let args = RMDIR3args {
object: diropargs3 {
dir: nfs_fh3 { data: dir_fh },
name: filename3(dirname.to_string()),
},
};
self._rmdir(args).await?;
Ok(())
}
}