MCPcopy Create free account
hub / github.com/aboutcode-org/vulnerablecode / write_file

Function write_file

vulnerabilities/pipes/export.py:168–173  ·  view source on GitHub ↗

Write ``data`` as YAML to ``repo_path``.

(repo_path, file_path, data)

Source from the content-addressed store, hash-verified

166
167
168def write_file(repo_path, file_path, data):
169 """Write ``data`` as YAML to ``repo_path``."""
170 write_to = repo_path / file_path
171 write_to.parent.mkdir(parents=True, exist_ok=True)
172 with open(write_to, encoding="utf-8", mode="w") as f:
173 f.write(saneyaml.dump(data))

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected