Sagents.FileSystem.FileMetadata (Sagents v0.8.0-rc.7)
Copy MarkdownMetadata for a file entry in the virtual filesystem.
Tracks size, timestamps, checksum, and mime_type. The mime_type field exists so multi-modal LLMs and downstream tools can route binary content (PDFs, images) correctly even when the path extension is ambiguous or absent.
Summary
Functions
Creates a changeset for file metadata.
Creates new metadata for file content.
Updates metadata timestamps and checksum for modified content.
Types
@type t() :: %Sagents.FileSystem.FileMetadata{ checksum: String.t() | nil, created_at: DateTime.t() | nil, mime_type: String.t(), modified_at: DateTime.t() | nil, size: integer() | nil }
Functions
Creates a changeset for file metadata.
Creates new metadata for file content.
Accepts optional :mime_type to override the default "text/markdown".
Updates metadata timestamps and checksum for modified content.
Preserves existing metadata fields (created_at, mime_type) and only
updates content-related fields. Accepts an optional :mime_type opt
to override that field.
Returns {:ok, metadata} or {:error, changeset}.