# `Omni.Tools.FileSystem.Entry`
[🔗](https://github.com/aaronrussell/omni_tools/blob/v0.1.0/lib/omni/tools/file_system/entry.ex#L1)

Metadata for a file managed by the filesystem tool.

Built from an `id` (base-relative path) and the absolute path on disk.
Content lives on disk; this struct is a lightweight view returned by
write, patch, and list operations.

    Entry.new("notes/todo.md", "/data/workspace/notes/todo.md")
    #=> %Entry{id: "notes/todo.md", filename: "todo.md", media_type: "text/markdown", ...}

# `t`

```elixir
@type t() :: %Omni.Tools.FileSystem.Entry{
  filename: String.t(),
  id: String.t(),
  media_type: String.t(),
  mtime: DateTime.t(),
  size: non_neg_integer()
}
```

File metadata returned by filesystem operations.

# `new`

```elixir
@spec new(String.t(), String.t()) :: t()
```

Builds an entry from a base-relative `id` and the file's absolute path.

Reads size and mtime from disk via `File.stat!/2`. Derives `filename`
from `id` and `media_type` from the file extension.

---

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