(path: str, content: str)
| 512 | |
| 513 | |
| 514 | def run_write(path: str, content: str) -> str: |
| 515 | try: |
| 516 | fp = safe_path(path) |
| 517 | fp.parent.mkdir(parents=True, exist_ok=True) |
| 518 | fp.write_text(content) |
| 519 | return f"Wrote {len(content)} bytes" |
| 520 | except Exception as e: |
| 521 | return f"Error: {e}" |
| 522 | |
| 523 | |
| 524 | def run_edit(path: str, old_text: str, new_text: str) -> str: |
no test coverage detected