MCPcopy
hub / github.com/astral-sh/python-build-standalone / get_file

Method get_file

pythonbuild/buildenv.py:107–115  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

105 fh.write(data)
106
107 def get_file(self, path):
108 log("retrieving container file %s" % path)
109 data = io.BytesIO(container_get_archive(self.container, "/build/%s" % path))
110
111 with tarfile.open(fileobj=data) as tf:
112 for ti in tf:
113 return tf.extractfile(ti).read()
114
115 raise Exception("file not found")
116
117 def get_output_archive(self, path=None, as_tar=False):
118 p = "/build/out"

Callers

nothing calls this directly

Calls 2

logFunction · 0.90
container_get_archiveFunction · 0.85

Tested by

no test coverage detected