LogoLogo
Home
Core Platform
Core Platform
  • Introduction
    • Overview
    • Use Cases
    • Architecture
    • Built with ML & AI
    • Quick Start
  • Examples
    • Training Examples
      • API Flow Examples
      • Microservice Examples
      • UI Example
      • Exercise: Hello World API
      • Exercise: Test State
      • Exercise: Test UI
    • Exercise: To-do List
      • To-do List Runner
      • To-do List Gateway
      • To-do List UI
      • To-do List Query
  • Troubleshooting
    • Rierino Packages
    • Release Notes
    • Useful Checks
    • Error Codes
  • Devops
    • Overview
    • API Flows
      • Using the Saga Screen
      • Defining a Saga
      • Configuring Saga Steps
        • Event Step
        • Transform Step
          • Transform Classes
        • Condition Step
          • Condition Classes
        • Step Link
      • Injecting Variables
    • Microservices
      • Runners
        • Using the Runner Screen
        • Defining a Runner
        • Managing Runner Settings
        • Adding Runner Elements
        • Deploying Runners
          • Spring Runners
          • Samza Runners
          • Camel Runners
      • Elements
        • Systems
        • State Managers
          • Typical Use Cases
          • State Data Structure
          • Local States
            • In-Memory Map
            • Caffeine Cache
            • Samza Based
            • Lucene Based
            • Single File
            • Multiple Files
            • Selected IDs Map
            • Indexed Map
          • Shared States
            • MongoDB Collection
            • Jooq (SQL) Table
            • Redis Map
            • Couchbase Collection
            • Elasticsearch Index
            • Elasticsearch Joined
            • Etcd Namespace
          • Specialized States
            • CRUD Service
            • Odata Service
          • State Coordinators
            • Lazy Cache Coordinator
            • Event Store Coordinator
            • Write thru Coordinator
          • Loading Strategies
          • ID Generators
        • Listeners
        • Query Managers
          • MongoDB
          • Elasticsearch
          • Lucene
          • SQL Based
          • Odata Service
        • Handlers
          • Core Handlers
            • Write Data
            • Read Data
            • Query Data
            • Apply Rules
            • Call Rest API
            • Generate Text/Html
            • Parse Html
            • Generate Secrets
            • Orchestrate User Task
            • Perform File Operation
            • Run Shell Command
            • Send/Receive Emails
          • Custom Code Handlers
            • Run Scripts
            • Run Java Code
            • Run Java Package
          • Flow Handlers
            • Orchestrate Saga
            • Loop Each Entry
            • Run Multiple Steps
            • Buffer Payloads
            • Merge Parallel Steps
            • Log Event
            • Send Event
            • Validate Event
            • Transform Event
            • Perform DB Transaction
            • Trigger Runner Command
            • Do Nothing
            • Modify Role Data
            • Enrich Role Data
            • Convert Pulse to Journal
          • Gateway Handlers
            • Authenticate
              • No Authentication
              • State Based
              • Keycloak Based
            • Sessionize
          • Specialized Handlers
            • Apply Advanced Rules
            • Calculate Real-time Metrics
            • Score ML Models
            • Score LangChain Models
            • Service MCP Requests
            • Service A2A Requests
            • Consume Web of Things
            • Perform Text Embedding
            • Run Python Procedure
            • Generate Excel
            • Generate PDF
            • Call SOAP API
            • Integrate with Camel
        • Actions
        • Streams
          • Kafka Topic
          • CDC Feed
          • Camel Component
        • Roles
        • Generic Settings
        • Global Settings
      • Deployments
        • Defining a Deployment
        • Alternative Loaders
    • Gateway & Security
      • Gateway Servers
        • Gateway Systems
        • Gateway Channels
        • Gateway Services
        • Gateway Tokens
      • APIs
        • OpenAPI Specification
        • Response Formats
    • Administration
      • Managing Deployments
      • Sending Commands
      • Streaming Messages
      • Migrating Assets
    • Batch Tasks
      • Python Processes
      • Python Iterators
      • Python Processors
    • Pro-Code
      • Custom Handlers
      • Custom State Managers
      • Custom Query Managers
      • Custom CDC Managers
  • Design
    • Overview
    • User Interface
      • Apps
      • UIs
        • Listers
        • Widgets
          • Value Widgets
          • Array Widgets
          • Object Widgets
          • Indirect Widgets
          • Atom Widgets
        • Menus
          • Lister Menu Actions
          • Selection Menu Actions
          • Editor Menu Actions
          • Widget Menu Actions
          • Custom Menu Actions
          • RAI Menu Actions
        • Extended Scope
          • Conditional Display
          • Data Context
          • Extra Data
          • Default Item
          • Extra Events
      • Options
      • Translations
      • Icons
      • Styles
      • Components
    • API Mapping
    • Data Schema
      • Common Data
  • Configuration
    • Overview
    • Queries
      • Query Types
      • Query Platforms
        • MongoDB Queries
        • Odata Queries
        • SQL Queries
        • Elasticsearch Queries
        • Lucene Queries
        • Siddhi Queries
    • Business Rules
      • Drools Rules
    • Dynamic Handlers
  • Data Science
    • Overview
    • ML Models
      • Scheduler Platforms
        • Airflow Scheduler
    • GenAI Models
    • MCP Servers
    • Complex Event Processing
      • Siddhi Data Flows
    • Data Visualizations
    • Customizations
  • EXTENSIONS
    • JMESPath
    • Handlebars
Powered by GitBook

© Rierino Software Inc. 2025. All rights reserved.

On this page
  • Handler Parameters
  • Actions
  • MakeDir
  • List / ListPath
  • Delete / DeletePath
  • Rename / RenamePath
  • CopyFile
  • Write / WriteFile
  • Read / ReadFile
  • Roles
  • syncFile
  1. Devops
  2. Microservices
  3. Elements
  4. Handlers
  5. Core Handlers

Perform File Operation

This handler (com.rierino.handler.FSEventHandler) provides ability to interact with local and remote file systems for directory and file operations.

Handler Parameters

Parameter
Definition
Example
Default

systems

Comma separated list of file system names to use

imageFs,cdnFs

-

role.source

System name for sourcing files from for sync file role calls

imageFs

-

role.target

System name for pushing files to for sync file role calls

cdnFs

-

role.fromRegex

Regex for filtering source files

/source/(?<folder>\\w+)/(?<file>\\w+)

-

role.toPattern

Pattern for converting source paths to target paths

/target/${folder}/${file}

-

role.move

Whether role calls should move files or just copy

true

false

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

-

With event metadata parameters as:

Parameter
Definition
Example
Default

pathPath

Json path in payload for directory path to create

filePath

path

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

-

With event metadata parameters as:

Parameter
Definition
Example
Default

pathPath

Json path in payload for directory path to list

filePath

path

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

pathPath

Json path in payload for file/directory path to delete

filePath

path

recursive

Whether deletion should include sub-directories

true

false

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

pathPath

Json path in payload for file/directory to rename

filePath

path

toPath

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

-

pathPath

Json path in payload for file/directory to copy

filePath

path

toPath

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

pathPath

Json path in payload for directory path to list (from payload root)

parameters.id

path

mode

Type of file(s) to output (, )

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, , or )

request

payload

overwrite

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

true

false

Example

Input

{
    "customerId": "customer-1",
    "productId": "product-1",
    "pageId": "product-detail"
}

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

pathPath

Json path in payload for directory path to list

id

path

format

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

json

text

Roles

syncFile

Uses pulse records to trigger delete, copy or move of files from one file system to another, based on handler role parameters.

PreviousOrchestrate User TaskNextRun Shell Command

Last updated 7 months ago