# Class LittleGhost::TrustedPath

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/TrustedPath.html

Marks a caller-supplied prompt directory as trusted application code.
Construction resolves symbolic links immediately and rejects paths that are
missing or are not directories.

### Choosing prompt directories

ERB templates run as Ruby inside the current process. TrustedPath checks that
a directory exists and resolves symbolic links; it cannot tell who may edit
that directory. Create these values only from application-configured,
non-user-writable roots, never from a request or model-selected path.

## Inheritance

`LittleGhost::TrustedPath < Data`

## Attributes

<a id="attribute-i-path"></a>
### `path` (R)

The resolved, existing directory asserted as trusted by the caller.

## Class methods

<a id="method-c-new"></a>
### `.new`

```ruby
new(path:) -> TrustedPath
```

Resolves `path` to an existing directory the caller asserts is trusted prompt
code. This checks existence and type, not ownership or permissions.
