# TreeNode

A node in the tree structure.

**Kind:** an object, used in responses.

## Fields

Every field is present in a response; empty ones are `null`.

| Field | Type | Description |
|---|---|---|
| `name` | `string` | Name of the file or directory. |
| `path` | `string` | Full path within the file system. |
| `type` | `string` | Entry type: "file" or "directory". |
| `size` | `integer` | File size (0 for directories). |
| `children` | [`TreeNode`](https://docs.maitento.com/reference/types/tree-node.md)`[]` | Child nodes (for directories). |

## Example

```json
{
  "name": "...",
  "path": "...",
  "type": "...",
  "size": 0,
  "children": [
    {
      "name": "...",
      "path": "...",
      "type": "...",
      "size": 0,
      "children": []
    }
  ]
}
```

## Where it's used

- Inside [`TreeResponse`](https://docs.maitento.com/reference/types/tree-response.md)
