Checks if file contains zip compressed content >>> isZipFile(paths.WORDLIST) True
(filename)
| 1328 | return hasattr(sys.stdin, "fileno") and not os.isatty(sys.stdin.fileno()) |
| 1329 | |
| 1330 | def isZipFile(filename): |
| 1331 | """ |
| 1332 | Checks if file contains zip compressed content |
| 1333 | |
| 1334 | >>> isZipFile(paths.WORDLIST) |
| 1335 | True |
| 1336 | """ |
| 1337 | |
| 1338 | checkFile(filename) |
| 1339 | |
| 1340 | with openFile(filename, "rb", encoding=None) as f: |
| 1341 | header = f.read(len(ZIP_HEADER)) |
| 1342 | |
| 1343 | return header == ZIP_HEADER |
| 1344 | |
| 1345 | def isDigit(value): |
| 1346 | """ |
no test coverage detected
searching dependent graphs…