MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / relative_path

Function relative_path

botasaurus/botasaurus_storage.py:4–6  ·  view source on GitHub ↗
(path, goback=0)

Source from the content-addressed store, hash-verified

2import json
3
4def relative_path(path, goback=0):
5 levels = [".."] * (goback + -1)
6 return os.path.abspath(os.path.join(os.getcwd(), *levels, path.strip()))
7
8def get_cache_file_path() -> str:
9 dr = os.path.abspath(os.path.join(os.path.dirname(__file__), 'botasaurus_storage.json'))

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected