MCPcopy Create free account
hub / github.com/RUC-NLPIR/WebThinker / ensure_dir

Function ensure_dir

scripts/lcb_runner/utils/path_utils.py:7–12  ·  view source on GitHub ↗
(path: str, is_file=True)

Source from the content-addressed store, hash-verified

5
6
7def ensure_dir(path: str, is_file=True):
8 if is_file:
9 pathlib.Path(path).parent.mkdir(parents=True, exist_ok=True)
10 else:
11 pathlib.Path(path).mkdir(parents=True, exist_ok=True)
12 return
13
14
15def get_cache_path(model_repr:str, args) -> str:

Callers 2

get_cache_pathFunction · 0.85
get_output_pathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected