# `HfHub.RepoFiles`
[🔗](https://github.com/North-Shore-AI/hf_hub_ex/blob/v0.3.1/lib/hf_hub/repo_files.ex#L1)

Repository file listing with ETag information.

Provides Bumblebee-compatible file listing that returns a map of
filenames to ETags, suitable for efficient cache validation.

## Examples

    # List files from HuggingFace repository
    {:ok, files} = HfHub.RepoFiles.get_repo_files({:hf, "bert-base-uncased"})
    # => %{"config.json" => ""abc123"", "pytorch_model.bin" => ""def456"", ...}

    # List files from local directory
    {:ok, files} = HfHub.RepoFiles.get_repo_files({:local, "/path/to/model"})
    # => %{"config.json" => nil, "pytorch_model.bin" => nil, ...}

# `get_repo_files`

```elixir
@spec get_repo_files(HfHub.Repository.t()) ::
  {:ok, %{required(String.t()) =&gt; String.t() | nil}} | {:error, term()}
```

Gets a map of files and their ETags from a repository.

For HuggingFace repositories, returns `%{filename => etag}` where etag
is used for cache validation. For local directories, returns
`%{filename => nil}`.

## Examples

    {:ok, files} = HfHub.RepoFiles.get_repo_files({:hf, "bert-base-uncased"})
    Map.has_key?(files, "config.json")
    # => true

---

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