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

Method extract

Lib/zipfile/__init__.py:1837–1849  ·  view source on GitHub ↗

Extract a member from the archive to the current working directory, using its full name. Its file information is extracted as accurately as possible. 'member' may be a filename or a ZipInfo object. You can specify a different directory using 'path'. You can specify t

(self, member, path=None, pwd=None)

Source from the content-addressed store, hash-verified

1835 return _ZipWriteFile(self, zinfo, zip64)
1836
1837 def extract(self, member, path=None, pwd=None):
1838 """Extract a member from the archive to the current working directory,
1839 using its full name. Its file information is extracted as accurately
1840 as possible. 'member' may be a filename or a ZipInfo object. You can
1841 specify a different directory using 'path'. You can specify the
1842 password to decrypt the file using 'pwd'.
1843 """
1844 if path is None:
1845 path = os.getcwd()
1846 else:
1847 path = os.fspath(path)
1848
1849 return self._extract_member(member, path, pwd)
1850
1851 def extractall(self, path=None, members=None, pwd=None):
1852 """Extract all members from the archive to the current working

Callers 1

extract_stackFunction · 0.45

Calls 1

_extract_memberMethod · 0.95

Tested by

no test coverage detected