(p: Path)
| 115 | |
| 116 | |
| 117 | def is_macho(p: Path) -> bool: |
| 118 | if p.is_symlink() or not p.is_file(): |
| 119 | return False |
| 120 | try: |
| 121 | with p.open("rb") as f: |
| 122 | return f.read(4) in MACHO_MAGICS |
| 123 | except OSError: |
| 124 | return False |
| 125 | |
| 126 | |
| 127 | def collect_machos(root: Path) -> list[Path]: |
no test coverage detected