def get_stdio_name(self, location: Location) -> str: if not location.has_payload(): return location.get_path() else: if location._payloads[-1].path: parent = location.parent() outdir = self._archive_manager.get_extractor_content_dir(parent) return os.path.join(outdir, location._payloads[-1].path) else: outdir = self._archive_manager.get_extractor_content_dir(location) return outdir
def get_fileinfo(self, location: Location) -> FileInfo: if not location.has_payload(): fi = FileInfo.from_path(location.get_path()) fi._location = location return fi else: parent = location.parent() assert parent.has_payload() outdir = self._archive_manager.get_extractor_content_dir(parent) path = os.path.join(outdir, location._payloads[-1].path) fi = FileInfo.from_path(path) fi._location = location return fi