Esempio n. 1
0
 async def load_file_descriptor(self,
                                fd: FileDescriptor) -> LocalFileManifest:
     try:
         entry_id = self.open_fds[fd]
     except KeyError:
         raise FSInvalidFileDescriptor(fd)
     manifest = await self.get_manifest(entry_id)
     assert isinstance(manifest, LocalFileManifest)
     return manifest
Esempio n. 2
0
 def remove_file_descriptor(self, fd: FileDescriptor) -> None:
     try:
         self.open_fds.pop(fd)
     except KeyError:
         raise FSInvalidFileDescriptor(fd)