> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# directory$

> Observable that emits the Directory instance once the client is connected, or undefined while disconnected.

```ts
get directory$(): Observable<Directory | undefined>
```

Observable that emits the [`Directory`](/docs/browser-sdk/v4/reference/interfaces/directory) instance once the client is connected,
or `undefined` while disconnected. Subscribe to this to safely wait for the directory
to become available without risking an error.

## **Examples**

```ts
client.directory$.subscribe(dir => {
  if (dir) dir.addresses$.subscribe(console.log);
});
```

## directory

```ts
get directory(): Directory | undefined
```

Current directory snapshot, or `undefined` if the client is not yet connected.
Prefer [`directory$`](#directory-1) when you need to react to the directory becoming available.