Skip to main content

Browser-based File Watcher

Watching directories for new files

With File Watcher, the Ganymede web application can be configured to watch for new files for processing. This feature enables users to define a directory that is monitored for new file additions or modifications. New files that appear in the directory are queued, enabling hands-free usage of Ganymede.

To setup a directory watcher, open up a flow on the

Home
page or via the
Flow Editor
page. The Flow Inputs section, shown below, consists of a form input for the input types that have been defined for the flow. Inputs that take files have a
icon that is used to select which directory needs to be watched. Note that this configuration is done per node, rather than per flow.

Flow Inputs

 

Configuring directory watching

Clicking on the

icon exposes the modal for configuring directory watching.

Browser-Based File Watcher

 

This produces a modal with two settings, the observation mode and the write mode.

The observation mode specifies which files are captured:

  • Differential mode detects files that are created or modified in a directory after the watcher is started.
  • Cumulative mode queues any files incorporate any files that already exist in the directory, and proceeds to look for any new files created or modified in the selected directory.

The write mode describes how Ganymede Cloud handles observed files. When the watcher detects a file, it will upload to our system independent of its mode. If a detected file has the same file name as one that already exists in our system for a given flow and input, there are two ways the watcher can move forward. The first is to queue the file already in our system to run. The second is to upload the file into our system with a unique name.

Once the watcher is configured, close out of the modal and click the file icon to select directory. The watcher will now continue to observe that directory until a user refreshes or closes the site or select the 'X' icon that appears when watching a file.

Executing flows upon file detection

The file watcher can be configured to either queue runs or execute a run once all files relevant to the flow have been detected. To configure this, click on the

Input Settings
button and check off "Enable auto-run".

Web-based file watcher auto-run