# Directory operations

### Check if directory exists <a href="#check-if-directory-exists" id="check-if-directory-exists"></a>

Determains whether directory at specified path exists.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter | Description        |
| --------- | ------------------ |
| Path      | The path to check. |

#### Output <a href="#output" id="output"></a>

Simple value,'True' if directory exists. 'False' otherwise.

#### Since <a href="#since" id="since"></a>

6.3

### Create directory <a href="#create-directory" id="create-directory"></a>

Creates a directory at the SFTP server. It is not possible to create several levels of directories in one step. If you want to create the directory "./dirA/dirB", the directory "./dirA" must exist. Otherwise you have to do it in two steps; first creates directory "./dirA" and the second one created "./dirA/dirB".

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter   | Description                      |
| ----------- | -------------------------------- |
| Remote path | Path to the directory to create. |

#### Output <a href="#output" id="output"></a>

No output.

#### Since <a href="#since" id="since"></a>

6.3

### Delete directory <a href="#delete-directory" id="delete-directory"></a>

Deletes specified directory. Note that the directory must be empty unless Recursive is set to true.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter   | Description                                                    |
| ----------- | -------------------------------------------------------------- |
| Remote path | Path to directory to delete                                    |
| Recursive   | Specifies whether to also delete all files and subdirectories. |

#### Output <a href="#output" id="output"></a>

No output.

#### Since <a href="#since" id="since"></a>

6.3

### List directory <a href="#list-directory" id="list-directory"></a>

Lists all files and directories in a specified path.

#### Parameters <a href="#parameters" id="parameters"></a>

| Parameter           | Description                                                                                                                                                                                             |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Remote path         | Path to list.                                                                                                                                                                                           |
| Mask                | Mask to use when filtering items in directory. Example "\*.txt". Regular expressions can also be used by prefixing with "regex:", example "regex:\[A\|B].\*" to list all files starting with "A" or "B" |
| Case sensitive      | Specifies whether to ignore casing or not.                                                                                                                                                              |
| Include files       | Specifies whether to include files in the listing.                                                                                                                                                      |
| Include directories | Specifies whether to include directories in the listing.                                                                                                                                                |
| Recursive           | Specifies whether to also search in subdirectories.                                                                                                                                                     |

#### Output <a href="#output" id="output"></a>

A table consisting of records with the following structure:

| Member           | Description                                             |
| ---------------- | ------------------------------------------------------- |
| Name             | The name of the file or directory.                      |
| IsDirectory      | True if the item is a directory, false if it is a file. |
| Size             | The size, in bytes, of the item.                        |
| LastAccessTime   | Last time item was accessed.                            |
| LastModifiedTime | Last time the item was modified.                        |
| CreationTime     | Time of item creation.                                  |

#### Since <a href="#since" id="since"></a>

6.3


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.novacuraflow.com/6.11/development/flow-studio/connectors/communication/sftp/directory-operations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
