# `SiteMaps.Location`
[🔗](https://github.com/marcosgz/site_maps_ex/blob/v0.1.0/lib/site_maps/location.ex#L1)

Storage keys of the files written by a process execution.

An execution writes a numbered family of files: the location `posts/%{year}/sitemap.xml` run
with `year: 2026` writes `posts/2026/sitemap1.xml`, `posts/2026/sitemap2.xml`, ... (with `.gz`
when the index is gzipped). A process without location writes `sitemap_<name>1.xml`, ... next
to the index. When the file name ends with a digit, a `-` separates it from the counter
(`posts-12-1.xml`). Keys are relative to the index directory and their path segments may only
contain `A-Z a-z 0-9 . _ ~ -`, so they are valid URL paths as they are.

# `t`

```elixir
@type t() :: %SiteMaps.Location{dir: String.t(), ext: String.t(), stem: String.t()}
```

# `counter_key`

```elixir
@spec counter_key(t()) :: {String.t(), String.t(), String.t()}
```

Counter key shared by executions writing to the same family.

# `family`

```elixir
@spec family(SiteMaps.Config.t(), SiteMaps.Process.t(), map()) :: t()
```

File family of `process` executed with `args`.

# `key`

```elixir
@spec key(t(), pos_integer()) :: String.t()
```

Key of the `n`-th file of the family.

# `member?`

```elixir
@spec member?(t(), String.t()) :: boolean()
```

Whether `key` belongs to the family.

# `pattern`

```elixir
@spec pattern(SiteMaps.Config.t(), SiteMaps.Process.t()) :: Regex.t()
```

Regex matching the keys any execution of `process` may write.

---

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