35
37
_DIR_ATTR = stat.S_IFDIR | ZIP_DIRECTORY_BIT
40
def zip_exporter(tree, dest, root, subdir):
39
41
""" Export this tree to a new zip file.
41
43
`dest` will be created holding the contents of this tree; if it
42
44
already exists, it will be overwritten".
46
48
now = time.localtime()[:6]
49
50
compression = zipfile.ZIP_DEFLATED
50
51
zipf = zipfile.ZipFile(dest, "w", compression)
64
56
mutter(" export {%s} kind %s to %s", file_id, ie.kind, dest)