---
title: "@vltpkg/xdg: Reference — vlt docs"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/api-reference/xdg/reference"
image: "https://docs.vlt.io/og/client/api-reference/xdg/reference"
lang: "en"
---

# Reference

## Classes

### XDG

Defined in: index.ts:76

#### Constructors

##### new XDG()

```ts
new XDG(name): XDG
```

Defined in: index.ts:85

###### Parameters

| Parameter | Type     |
| --------- | -------- |
| `name`    | `string` |

###### Returns

[`XDG`](https://docs.vlt.io/client/api-reference/xdg/reference.md#xdg)

#### Properties

| Property       | Type     |
| -------------- | -------- |
| `base`         | `object` |
| `base.cache`   | `string` |
| `base.config`  | `string` |
| `base.data`    | `string` |
| `base.runtime` | `string` |
| `base.state`   | `string` |
| `name`         | `string` |

#### Methods

##### cache()

```ts
cache(p): string
```

Defined in: index.ts:91

###### Parameters

| Parameter | Type     | Default value |
| --------- | -------- | ------------- |
| `p`       | `string` | `''`          |

###### Returns

`string`

##### config()

```ts
config(p): string
```

Defined in: index.ts:88

###### Parameters

| Parameter | Type     | Default value |
| --------- | -------- | ------------- |
| `p`       | `string` | `''`          |

###### Returns

`string`

##### data()

```ts
data(p): string
```

Defined in: index.ts:94

###### Parameters

| Parameter | Type     | Default value |
| --------- | -------- | ------------- |
| `p`       | `string` | `''`          |

###### Returns

`string`

##### runtime()

```ts
runtime(p): string
```

Defined in: index.ts:100

###### Parameters

| Parameter | Type     | Default value |
| --------- | -------- | ------------- |
| `p`       | `string` | `''`          |

###### Returns

`string`

##### state()

```ts
state(p): string
```

Defined in: index.ts:97

###### Parameters

| Parameter | Type     | Default value |
| --------- | -------- | ------------- |
| `p`       | `string` | `''`          |

###### Returns

`string`

## Type Aliases

### PathType

```ts
type PathType = "cache" | "config" | "data" | "runtime" | "state";
```

Defined in: index.ts:7
