MCPcopy
hub / github.com/LawRefBook/Laws / path

Method path

scripts/request.py:105–111  ·  view source on GitHub ↗
(self, key: str, type: CacheType, filetype=None)

Source from the content-addressed store, hash-verified

103 self.base_path = Path("./__cache__")
104
105 def path(self, key: str, type: CacheType, filetype=None) -> Path:
106 if filetype:
107 key = f"{key}.{filetype}"
108 p: Path = self.base_path / type.value
109 if not p.exists():
110 p.mkdir()
111 return p / key
112
113 def is_exists(self, key: str, type: CacheType, filetype=None):
114 full_path = self.path(key, type, filetype)

Callers 3

is_existsMethod · 0.95
getMethod · 0.95
setMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected