(&self, path: &Path)
| 84 | } |
| 85 | |
| 86 | fn remove_dir(&self, path: &Path) -> virtual_fs::Result<()> { |
| 87 | let path = self.prepare_path(path)?; |
| 88 | if path.parent().is_none() { |
| 89 | return Err(FsError::BaseNotDirectory); |
| 90 | } |
| 91 | if path.is_dir() |
| 92 | && fs::read_dir(&path) |
| 93 | .map(|mut entries| entries.next().is_some()) |
| 94 | .unwrap_or(false) |
| 95 | { |
| 96 | return Err(FsError::DirectoryNotEmpty); |
| 97 | } |
| 98 | fs::remove_dir(path).map_err(FsError::from) |
| 99 | } |
| 100 | |
| 101 | fn rename<'a>( |
| 102 | &'a self, |
nothing calls this directly
no test coverage detected