# FileOperationRecord

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/file_ops/FileOperationRecord)

Track a single filesystem tool call.

## Signature

```python
FileOperationRecord(
    self,
    tool_name: str,
    display_path: str,
    physical_path: Path | None,
    tool_call_id: str | None,
    args: dict[str, Any] = dict(),
    status: FileOpStatus = 'pending',
    tool_succeeded: bool = False,
    error: str | None = None,
    metrics: FileOpMetrics = FileOpMetrics(),
    diff: str | None = None,
    diff_stats: DiffStats | None = None,
    before_content: str | None = None,
    after_content: str | None = None,
    read_output: str | None = None,
    hitl_approved: bool = False,
    diff_outcome: DiffOutcome = 'shown',
    after_read_error: str | None = None,
)
```

## Constructors

```python
__init__(
    self,
    tool_name: str,
    display_path: str,
    physical_path: Path | None,
    tool_call_id: str | None,
    args: dict[str, Any] = dict(),
    status: FileOpStatus = 'pending',
    tool_succeeded: bool = False,
    error: str | None = None,
    metrics: FileOpMetrics = FileOpMetrics(),
    diff: str | None = None,
    diff_stats: DiffStats | None = None,
    before_content: str | None = None,
    after_content: str | None = None,
    read_output: str | None = None,
    hitl_approved: bool = False,
    diff_outcome: DiffOutcome = 'shown',
    after_read_error: str | None = None,
) -> None
```

| Name | Type |
|------|------|
| `tool_name` | `str` |
| `display_path` | `str` |
| `physical_path` | `Path \| None` |
| `tool_call_id` | `str \| None` |
| `args` | `dict[str, Any]` |
| `status` | `FileOpStatus` |
| `tool_succeeded` | `bool` |
| `error` | `str \| None` |
| `metrics` | `FileOpMetrics` |
| `diff` | `str \| None` |
| `diff_stats` | `DiffStats \| None` |
| `before_content` | `str \| None` |
| `after_content` | `str \| None` |
| `read_output` | `str \| None` |
| `hitl_approved` | `bool` |
| `diff_outcome` | `DiffOutcome` |
| `after_read_error` | `str \| None` |


## Properties

- `tool_name`
- `display_path`
- `physical_path`
- `tool_call_id`
- `args`
- `status`
- `tool_succeeded`
- `error`
- `metrics`
- `diff`
- `diff_stats`
- `before_content`
- `after_content`
- `read_output`
- `hitl_approved`
- `diff_outcome`
- `after_read_error`

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/81258067f4c74c3ede7d2b2895d9835137ba5977/libs/code/deepagents_code/file_ops.py#L339)