MCPcopy Index your code
hub / github.com/python/cpython / make_zip_file

Function make_zip_file

Lib/test/test_importlib/resources/zip.py:8–16  ·  view source on GitHub ↗

Zip the files in tree into a new zipfile at dst.

(tree, dst)

Source from the content-addressed store, hash-verified

6
7
8def make_zip_file(tree, dst):
9 """
10 Zip the files in tree into a new zipfile at dst.
11 """
12 with zipfile.ZipFile(dst, 'w') as zf:
13 for name, contents in walk(tree):
14 zf.writestr(name, contents)
15 zipfile._path.CompleteDirs.inject(zf)
16 return dst
17
18
19def walk(tree, prefix=''):

Callers

nothing calls this directly

Calls 3

writestrMethod · 0.80
injectMethod · 0.80
walkFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…