from pathlib import Path
from spotregen.gui.model import inside_repository
print(inside_repository("/work/demo", Path("/work/demo/regen/runs/a.md")))
print(inside_repository("/work/demo", Path("/tmp/a.md")))True
False
Whether a file lies below the repository root (symbolic links resolved).
| Name | Type | Description | Default |
|---|---|---|---|
| root | Path | str | The repository root. | required |
| path | Path | The file, which need not exist. | required |
| Name | Type | Description |
|---|---|---|
| bool | bool | True if path is the root or below it. |