Workaround for `zipfile.Path.is_file` returning true for non-existent paths.
(self, path)
| 50 | raise FileNotFoundError(exc.args[0]) |
| 51 | |
| 52 | def is_resource(self, path): |
| 53 | """ |
| 54 | Workaround for `zipfile.Path.is_file` returning true |
| 55 | for non-existent paths. |
| 56 | """ |
| 57 | target = self.files().joinpath(path) |
| 58 | return target.is_file() and target.exists() |
| 59 | |
| 60 | def files(self): |
| 61 | return zipfile.Path(self.archive, self.prefix) |