MCPcopy Index your code
hub / github.com/modelscope/modelscope / _is_valid_dir

Function _is_valid_dir

modelscope/hub/cache_manager.py:423–433  ·  view source on GitHub ↗

Check if a directory is valid for scanning.

(dir: Path)

Source from the content-addressed store, hash-verified

421
422
423def _is_valid_dir(dir: Path) -> bool:
424 """Check if a directory is valid for scanning."""
425 if not dir.exists():
426 return False
427 if not dir.is_dir():
428 return False
429 if dir.is_symlink():
430 return False
431 if dir.name in FILES_TO_IGNORE:
432 return False
433 return True
434
435
436def _scan_dir(dir: Path, repo_type: str, inplace: bool = False):

Callers 1

_scan_dirFunction · 0.85

Calls 1

existsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…