Given a writable zip file zf, inject directory entries for any directories implied by the presence of children.
(cls, zf: zipfile.ZipFile)
| 164 | |
| 165 | @classmethod |
| 166 | def inject(cls, zf: zipfile.ZipFile) -> zipfile.ZipFile: |
| 167 | """ |
| 168 | Given a writable zip file zf, inject directory entries for |
| 169 | any directories implied by the presence of children. |
| 170 | """ |
| 171 | for name in cls._implied_dirs(zf.namelist()): |
| 172 | zf.writestr(name, b"") |
| 173 | return zf |
| 174 | |
| 175 | |
| 176 | class FastLookup(CompleteDirs): |
no test coverage detected