# `Sagents.FileSystem.FileMetadata`

Metadata for a file entry in the virtual filesystem.

Since all content is text (for LLM work), mime_type typically indicates
the format: text/plain, text/markdown, application/json, etc.

# `t`

```elixir
@type t() :: %Sagents.FileSystem.FileMetadata{
  checksum: String.t() | nil,
  created_at: DateTime.t() | nil,
  custom: map(),
  encoding: String.t(),
  mime_type: String.t(),
  modified_at: DateTime.t() | nil,
  size: integer() | nil
}
```

# `changeset`

Creates a changeset for file metadata.

# `new`

Creates new metadata for file content with optional custom attributes.

# `update_for_modification`

Updates metadata timestamps and checksum for modified content.

Preserves existing metadata fields (custom, created_at, mime_type, encoding)
and only updates content-related fields. Accepts optional opts to override
specific fields (e.g. `:custom`, `:mime_type`).

Returns `{:ok, metadata}` or `{:error, changeset}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
