# `Cauldron2D.Paths`
[🔗](https://github.com/jaman/cauldron/blob/v0.1.3/cauldron_2d/lib/cauldron_2d/paths.ex#L1)

Where a game keeps its files: one directory per game under each of the XDG base
directories.

    Cauldron2D.Paths.config(:my_game, "alice.settings")
    #=> "~/.config/my_game/alice.settings"
    Cauldron2D.Paths.data(:my_game, ["saves", "one.save"])
    Cauldron2D.Paths.cache(:my_game)

`$XDG_CONFIG_HOME`, `$XDG_DATA_HOME` and `$XDG_CACHE_HOME` are honoured; without them
the directories are `~/.config`, `~/.local/share` and `~/.cache`. Nothing here creates a
directory.

# `game`

```elixir
@type game() :: atom() | String.t()
```

# `parts`

```elixir
@type parts() :: Path.t() | [Path.t()]
```

# `cache`

```elixir
@spec cache(game(), parts()) :: Path.t()
```

A path under the game's cache directory.

# `config`

```elixir
@spec config(game(), parts()) :: Path.t()
```

A path under the game's configuration directory.

# `data`

```elixir
@spec data(game(), parts()) :: Path.t()
```

A path under the game's data directory.

---

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