True when ``path`` resolves to a target inside ``root``.
(path: Path, root: Path)
| 1016 | |
| 1017 | |
| 1018 | def _resolves_under_root(path: Path, root: Path) -> bool: |
| 1019 | """True when ``path`` resolves to a target inside ``root``.""" |
| 1020 | try: |
| 1021 | path.resolve().relative_to(root.resolve()) |
| 1022 | except (OSError, RuntimeError, ValueError): |
| 1023 | return False |
| 1024 | return True |
| 1025 | |
| 1026 | |
| 1027 | def detect(root: Path, *, follow_symlinks: bool | None = None, google_workspace: bool | None = None, extra_excludes: list[str] | None = None) -> dict: |
no outgoing calls
no test coverage detected