Remove a mapping from the fs mapper. Args: vpath: bound virtual path to remove Raises: `KeyError`: in case the specified vpath has no mapping
(self, vpath: QlPath)
| 218 | self._mapping[absvpath] = binding |
| 219 | |
| 220 | def remove_mapping(self, vpath: QlPath) -> None: |
| 221 | """Remove a mapping from the fs mapper. |
| 222 | |
| 223 | Args: |
| 224 | vpath: bound virtual path to remove |
| 225 | |
| 226 | Raises: |
| 227 | `KeyError`: in case the specified vpath has no mapping |
| 228 | """ |
| 229 | |
| 230 | vpath = self.__fspath(vpath) |
| 231 | absvpath = self.path.virtual_abspath(vpath) |
| 232 | |
| 233 | if not self.has_mapping(absvpath): |
| 234 | raise KeyError(absvpath) |
| 235 | |
| 236 | del self._mapping[absvpath] |
| 237 | |
| 238 | def rename_mapping(self, old_vpath: str, new_vpath: str) -> None: |
| 239 | old_absvpath = self.path.virtual_abspath(old_vpath) |
no test coverage detected