For the complete documentation index, see llms.txt. This page is also available as Markdown.

Perform File Operation

These actions provide ability to interact with local and remote file systems for directory and file operations.

Perform File Operation Actions

MakeDir

Creates a new directory in given file system. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

Domain

Name of the file system to use

imageFs

-

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "MakeDir action eventMeta fields",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "definition": "Name of the file system to use",
          "example": "imageFs"
        }
      }
    }
  }
}

With event metadata parameters as:

Parameter
Definition
Example
Default

Path Path

Json path in payload for directory path to create

filePath

path

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "MakeDir action eventMeta.parameters",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "parameters": {
          "type": "object",
          "properties": {
            "pathPath": {
              "type": "string",
              "definition": "Json path in payload for directory path to create",
              "default": "path",
              "example": "filePath"
            }
          }
        }
      }
    }
  }
}

List / ListPath

Lists files and directories for given path. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

Domain

Name of the file system to use

imageFs

-

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "List action eventMeta fields",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "domain": {
          "type": "string",
          "definition": "Name of the file system to use",
          "example": "imageFs"
        }
      }
    }
  }
}

With event metadata parameters as:

Parameter
Definition
Example
Default

Path Path

Json path in payload for directory path to list

filePath

path

Skip

Files to skip in list results

10

-

Limit

Number of files to return in results

10

-

Search

Term to search in file names

pdf

-

Order By

Sort field (date, name, size)

date

-

Ascending

Whether to sort ascending

false

true

Detect Type

Whether to detect content type (single file only)

true

-

Parse Meta

Whether to detect analyze file metadata (single file only)

true

-

Produce Hash

Whether to produce content hash (single file only)

true

-

Output Pattern

Jmespath for producing list results

-

-

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "List action eventMeta.parameters",
  "type": "object",
  "properties": {
    "eventMeta": {
      "type": "object",
      "properties": {
        "parameters": {
          "type": "object",
          "properties": {
            "pathPath": {
              "type": "string",
              "definition": "Json path in payload for directory path to list",
              "default": "path",
              "example": "filePath"
            },
            "skip": {
              "type": "integer",
              "definition": "Files to skip in list results",
              "example": 10
            },
            "limit": {
              "type": "integer",
              "definition": "Number of files to return in results",
              "example": 10
            },
            "search": {
              "type": "string",
              "definition": "Term to search in file names",
              "example": "pdf"
            },
            "orderBy": {
              "type": "string",
              "definition": "Sort field (date, name, size)",
              "enum": [
                "date",
                "name",
                "size"
              ],
              "example": "date"
            },
            "ascending": {
              "type": "boolean",
              "definition": "Whether to sort ascending",
              "default": true,
              "example": false
            },
            "detectType": {
              "type": "boolean",
              "definition": "Whether to detect content type (single file only)",
              "example": true
            },
            "parseMeta": {
              "type": "boolean",
              "definition": "Whether to analyze file metadata (single file only)",
              "example": true
            },
            "produceHash": {
              "type": "boolean",
              "definition": "Whether to produce content hash (single file only)",
              "example": true
            },
            "outputPattern": {
              "type": "string",
              "definition": "Jmespath for producing list results"
            }
          }
        }
      }
    }
  }
}

Delete / DeletePath

Deletes a file or directory in given file system. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

Domain

Name of the file system to use

imageFs

-

With event metadata parameters as:

Parameter
Definition
Example
Default

Path Path

Json path in payload for file/directory path to delete

filePath

path

Rename / RenamePath

Renames a file or directory in given file system. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

Domain

Name of the file system to use

imageFs

-

With event metadata parameters as:

Parameter
Definition
Example
Default

Path Path

Json path in payload for file/directory to rename

filePath

path

To Path

Json path in payload for new file/directory name

newPath

to

CopyFile

Copies or moves a file from one file system to another. Event metadata fields applicable for this action are as follows:

Field
Definition
Example
Default

Domain

Name of the source file system to use

imageFs

-

With event metadata parameters as:

Parameter
Definition
Example
Default

target

Name of the target file system

cdnFs

-

Path Path

Json path in payload for file/directory to copy

filePath

path

To Path

Json path in payload for target file/directory

newPath

to

Move

Whether file should be deleted from the source

true

false

Write / WriteFile

Writes contents to a single file or a set of files for a given file system:

Field
Definition
Example
Default

Domain

Name of the file system to write to

dataLakeFs

-

With event metadata parameters as:

Parameter
Definition
Example
Default

Path Path

Json path in payload for file path to write (from payload root)

parameters.id

path

Mode

Type of file(s) to output (sequence, single)

sequence

single

Prefix

Prefix to add to each file's name (for sequence mode output)

tracking/views

-

Suffix

Suffix to add to each file's name (for sequence mode output)

_out.json

-

Content

Event contents to write to file (for sequence mode, event, request or payload)

request

payload

Overwrite

Whether to overwrite or append contents to output (for single mode output)

true

false

Base64

Whether the input should be treated as base64 text and decoded for generating the file (e.g. image, PDF)

true

false

Example

Input

Event Metadata

For sequence output mode, this handler uses a path writer, which is responsible for generating unique sequence file paths/names for wrting contents to. The writer can be configured by adding path.* parameters to file system definition.

Using "[uuid]" in prefix or suffix allows generation of globally unique paths and file names, as this entry is replaced with a UUID value generated.

Read / ReadFile

Reads and returns contents of a file (in a cachable manner):

Field
Definition
Example
Default

Domain

Name of the file system to read from

contentsFs

-

With event metadata parameters as:

Parameter
Definition
Example
Default

Path Path

Json path in payload for file path to read

id

path

Format

Format of the file contents to retrieve (json,text)

json

text

Max Length

Maximum file size to be allowed for reading

1000000

-

Output Pattern

Jmespath pattern to apply to json format output

-

-

Last updated