MCPcopy Index your code
hub / github.com/openai/openai-agents-python / delete_file

Method delete_file

examples/tools/apply_patch.py:58–63  ·  view source on GitHub ↗
(self, operation: ApplyPatchOperation)

Source from the content-addressed store, hash-verified

56 return ApplyPatchResult(output=f"Updated {relative}")
57
58 def delete_file(self, operation: ApplyPatchOperation) -> ApplyPatchResult:
59 relative = self._relative_path(operation.path)
60 self._require_approval(operation, relative)
61 target = self._resolve(operation.path)
62 target.unlink(missing_ok=True)
63 return ApplyPatchResult(output=f"Deleted {relative}")
64
65 def _relative_path(self, value: str) -> str:
66 resolved = self._resolve(value)

Callers

nothing calls this directly

Calls 4

_relative_pathMethod · 0.95
_require_approvalMethod · 0.95
_resolveMethod · 0.95
ApplyPatchResultClass · 0.90

Tested by

no test coverage detected