List Files
List all files in a DTN FTP directory, optionally including subdirectories.
Operation
Section titled “Operation”listFiles
Resource
Section titled “Resource”file
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Path | string | No | / | The directory path to list files from |
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
| Recursive | boolean | true | Whether to list files recursively in subdirectories |
Response
Section titled “Response”Success
Section titled “Success”Returns an array of file information objects:
{ "name": "pricing_2024-01-15.csv", "path": "/data/pricing_2024-01-15.csv", "size": 15420, "type": "file", "modifiedAt": "2024-01-15T08:00:00Z"}{ "success": false, "error": "Connection refused"}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
| name | string | File name |
| path | string | Full path to the file |
| size | number | File size in bytes |
| type | string | Entry type (file or directory) |
| modifiedAt | string | Last modification timestamp |
Error Handling
Section titled “Error Handling”- Missing Host: DTN credential is missing host
- Connection Failure: Unable to connect to FTP server
- Invalid Path: Directory path does not exist