MCPcopy Index your code
hub / github.com/RustPython/RustPython / compare_paths

Function compare_paths

scripts/update_lib/file_utils.py:233–242  ·  view source on GitHub ↗

Compare a CPython path with a local path (file or directory).

(cpython_path: pathlib.Path, local_path: pathlib.Path)

Source from the content-addressed store, hash-verified

231
232
233def compare_paths(cpython_path: pathlib.Path, local_path: pathlib.Path) -> bool:
234 """Compare a CPython path with a local path (file or directory)."""
235 if not local_path.exists():
236 return False
237
238 if cpython_path.is_file():
239 return filecmp.cmp(cpython_path, local_path, shallow=False)
240
241 dcmp = filecmp.dircmp(cpython_path, local_path)
242 return _dircmp_is_same(dcmp)
243
244
245def compare_file_contents(

Callers 2

is_path_syncedFunction · 0.90
is_up_to_dateFunction · 0.90

Calls 4

_dircmp_is_sameFunction · 0.85
existsMethod · 0.45
is_fileMethod · 0.45
cmpMethod · 0.45

Tested by

no test coverage detected