---
url: /process-functions/datasource-directoryexists.md
description: Checks whether a directory exists.
---

# datasource.directoryExists&#x20;

Checks whether a directory exists.

```js
datasource.directoryExists(directoryName)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `directoryName` | `string` | The path of the directory to check. |

## Returns

`true` when the directory exists, otherwise `false`.

## Examples

```js
const exists = datasource.directoryExists("Upload/Images");
```
