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

Function relative_path

botasaurus_server/botasaurus_server/server.py:10–12  ·  view source on GitHub ↗
(path, goback=0)

Source from the content-addressed store, hash-verified

8from .controls_adapter import ControlsAdapter
9
10def relative_path(path, goback=0):
11 levels = [".."] * (goback + -1)
12 return os.path.abspath(os.path.join(os.getcwd(), *levels, path.strip()))
13
14def compute_hash(content):
15 return sha256(content.encode("utf-8")).hexdigest()

Callers 1

get_input_jsMethod · 0.70

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected