MCPcopy Create free account
hub / github.com/SourceCode-AI/aura / get_file_content

Function get_file_content

aura/config.py:186–195  ·  view source on GitHub ↗
(location: str, base_path: Optional[str]=None)

Source from the content-addressed store, hash-verified

184
185
186def get_file_content(location: str, base_path: Optional[str]=None) -> str:
187 pth = get_file_location(location, base_path)
188
189 if pth.startswith("aura.data."): # Load file as a resource from aura package
190 filename = pth[len("aura.data."):]
191 return resources.read_text("aura.data", filename)
192
193 else:
194 with open(location, "r") as fd:
195 return fd.read()
196
197
198def parse_config(pth, default_pth) -> dict:

Callers 1

parse_configFunction · 0.85

Calls 2

get_file_locationFunction · 0.85
readMethod · 0.80

Tested by

no test coverage detected