MCPcopy Create free account
hub / github.com/defold/defold / extract_zip

Function extract_zip

editor/scripts/bundle.py:127–136  ·  view source on GitHub ↗
(file, path)

Source from the content-addressed store, hash-verified

125 run.command(['tar', '-C', path, '-xzf', file])
126
127def extract_zip(file, path):
128 if sys.platform == 'darwin':
129 # We use the system unzip command for macOS because zip (and
130 # others) on macOS has special handling of ._ files that
131 # contain additional HFS+ attributes. See for example:
132 # http://superuser.com/questions/61185/why-do-i-get-files-like-foo-in-my-tarball-on-os-x
133 run.command(['unzip', file, '-d', path])
134 else:
135 with zipfile.ZipFile(file, 'r') as zf:
136 zf.extractall(path)
137
138def extract(file, path):
139 log('Extracting %s to %s' % (file, path))

Callers 1

extractFunction · 0.85

Calls 1

commandMethod · 0.80

Tested by

no test coverage detected