MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / check_astrbot_root

Function check_astrbot_root

astrbot/cli/utils/basic.py:9–17  ·  view source on GitHub ↗

Check if the path is an AstrBot root directory

(path: str | Path)

Source from the content-addressed store, hash-verified

7
8
9def check_astrbot_root(path: str | Path) -> bool:
10 """Check if the path is an AstrBot root directory"""
11 if not isinstance(path, Path):
12 path = Path(path)
13 if not path.exists() or not path.is_dir():
14 return False
15 if not (path / ".astrbot").exists():
16 return False
17 return True
18
19
20def get_astrbot_root() -> Path:

Callers 3

_load_configFunction · 0.85
runFunction · 0.85
_get_data_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected