Remove a mount point from the VFS
(&mut self,
path: &str)
| 41 | |
| 42 | /// Remove a mount point from the VFS |
| 43 | pub fn umount(&mut self, |
| 44 | path: &str) -> Result<(),()> { |
| 45 | let mut mounts = self.0.write(); |
| 46 | if let Some(index) = mounts.iter().position( |
| 47 | |mount_path| mount_path.0 == path) { |
| 48 | // Found an index |
| 49 | _ = mounts.swap_remove(index); |
| 50 | return Ok(()); |
| 51 | } |
| 52 | Err(()) |
| 53 | } |
| 54 | |
| 55 | /// Open a path, returning a handle to read/write and the |
| 56 | /// length of the string matched. |
no test coverage detected