# Module /os/well-known

Cross-platform XDG / OS standard directories (config-dir, cache-dir, data-dir, home-dir, download-dir).

```tangu
(use /os/well-known)
```

## Functions & symbols

### cache-dir

`(cache-dir) -> (Or String Error)`

Returns the host OS path for the user cache directory (XDG_CACHE_HOME).

```tangu
(wk/cache-dir)
```

### config-dir

`(config-dir) -> (Or String Error)`

Returns the host OS path for the user-specific configuration directory (XDG_CONFIG_HOME / AppData).

```tangu
(wk/config-dir)
```

### data-dir

`(data-dir) -> (Or String Error)`

Returns the host OS path for the roaming user data directory (XDG_DATA_HOME).

```tangu
(wk/data-dir)
```

### data-local-dir

`(data-local-dir) -> (Or String Error)`

Returns the host OS path for the machine-local application data directory.

```tangu
(wk/data-local-dir)
```

### desktop-dir

`(desktop-dir) -> (Or String Error)`

Returns the host OS path for the user Desktop directory.

```tangu
(wk/desktop-dir)
```

### document-dir

`(document-dir) -> (Or String Error)`

Returns the host OS path for the user Documents directory.

```tangu
(wk/document-dir)
```

### download-dir

`(download-dir) -> (Or String Error)`

Returns the host OS path for the user Downloads directory.

```tangu
(wk/download-dir)
```

### executable-dir

`(executable-dir) -> (Or String Error)`

Returns the host OS path for the user binary/executable directory (~/.local/bin).

```tangu
(wk/executable-dir)
```

### font-dir

`(font-dir) -> (Or String Error)`

Returns the host OS path for the user Fonts directory.

```tangu
(wk/font-dir)
```

### get-app-dirs

`(get-app-dirs qualifier org app) -> Map`

Computes standard OS app directories `{:config-dir :data-dir :cache-dir :state-dir ...}` for an application ID.

| Parameter | Type | Optional | Description |
| :--- | :--- | :--- | :--- |
| `qualifier` | `String` | no | Reverse-domain qualifier (e.g. "com") |
| `org` | `String` | no | Organization name |
| `app` | `String` | no | Application name |

```tangu
(wk/get-app-dirs "dev" "tangu" "cli")
```

### get-user-dirs

`(get-user-dirs) -> Map`

Returns a Map of all standard OS user directories (`:home-dir`, `:desktop-dir`, `:download-dir`, ...).

```tangu
(wk/get-user-dirs)
```

### home-dir

`(home-dir) -> (Or String Error)`

Returns the host OS path for the current user's home directory.

```tangu
(wk/home-dir)
```

### music-dir

`(music-dir) -> (Or String Error)`

Returns the host OS path for the user Music directory.

```tangu
(wk/music-dir)
```

### picture-dir

`(picture-dir) -> (Or String Error)`

Returns the host OS path for the user Pictures directory.

```tangu
(wk/picture-dir)
```

### preference-dir

`(preference-dir) -> (Or String Error)`

Returns the host OS path for the user preference directory.

```tangu
(wk/preference-dir)
```

### public-dir

`(public-dir) -> (Or String Error)`

Returns the host OS path for the user Public share directory.

```tangu
(wk/public-dir)
```

### runtime-dir

`(runtime-dir) -> (Or String Error)`

Returns the host OS path for the user runtime socket/PID directory (XDG_RUNTIME_DIR).

```tangu
(wk/runtime-dir)
```

### state-dir

`(state-dir) -> (Or String Error)`

Returns the host OS path for the user state data directory (XDG_STATE_HOME).

```tangu
(wk/state-dir)
```

### template-dir

`(template-dir) -> (Or String Error)`

Returns the host OS path for the user Templates directory.

```tangu
(wk/template-dir)
```

### video-dir

`(video-dir) -> (Or String Error)`

Returns the host OS path for the user Videos directory.

```tangu
(wk/video-dir)
```
