MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _check_zipfile

Function _check_zipfile

tools/python-3.11.9-amd64/Lib/zipfile.py:218–224  ·  view source on GitHub ↗
(fp)

Source from the content-addressed store, hash-verified

216 return b''.join(buffer)
217
218def _check_zipfile(fp):
219 try:
220 if _EndRecData(fp):
221 return True # file has correct magic number
222 except OSError:
223 pass
224 return False
225
226def is_zipfile(filename):
227 """Quickly see if a file is a ZIP file by checking the magic number.

Callers 1

is_zipfileFunction · 0.85

Calls 1

_EndRecDataFunction · 0.85

Tested by

no test coverage detected