MCPcopy Create free account
hub / github.com/abi/screenshot-to-code / write_to_file

Method write_to_file

backend/debug/DebugFileWriter.py:22–27  ·  view source on GitHub ↗
(self, filename: str, content: str)

Source from the content-addressed store, hash-verified

20 logging.error("Failed to create debug directory")
21
22 def write_to_file(self, filename: str, content: str) -> None:
23 try:
24 with open(os.path.join(self.debug_artifacts_path, filename), "w") as file:
25 file.write(content)
26 except Exception as e:
27 logging.error(f"Failed to write to file: {e}")
28
29 def extract_html_content(self, text: str) -> str:
30 return str(text.split("<html>")[-1].rsplit("</html>", 1)[0] + "</html>")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected