MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / is_macho

Function is_macho

scripts/macos_bundle_dylibs.py:117–124  ·  view source on GitHub ↗
(p: Path)

Source from the content-addressed store, hash-verified

115
116
117def 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
127def collect_machos(root: Path) -> list[Path]:

Callers 1

collect_machosFunction · 0.85

Calls 2

openMethod · 0.80
readMethod · 0.45

Tested by

no test coverage detected