Spanish Total.js
English
Documentation For AI agents
Contents

Files and video

Components that watch, write, rename and remove files, and convert videos.

.md GitHub
On this page

Components that watch, write, rename and remove files, and convert videos. This page holds the catalogue groups Files, Video.

Each entry lists the inputs and outputs of the component, its main settings and the text of its readme. To add a component to a FlowStream, see Download components.

API

component

filewatcher.html · version 1

Waits for a file to exist, reads it, sends its content and removes it.
ParameterTypeDescription
path? String Path.
parser? String Parser. One of: json (JSON), text (Text), buffer (Buffer), number (Number), date (Date). Default: json
interval? Number Interval (milliseconds). Default: 1000

Inputs: none.

Outputs: output (Output).

The component watches the existence of the file, then reads the content and sends it next. The file will be removed automatically after reading.

component

filewriter.html · version 1

Writes incoming data into a file.
ParameterTypeDescription
path? String Path.
serializer? String Serializer. One of: json (JSON), text (Text), buffer (Buffer). Default: json
rewrite? Boolean Rewrite content. Default: true
divider? String Divider. Default: \n

Inputs: input (Input).

Outputs: none.

The component writes incoming data into the file.

component

fileswatcher.html · version 1

Watches a folder for new files.
ParameterTypeDescription
path? String Path. Default: /www/
ext? String Extension. Default: .mp4
interval? Number Interval (milliseconds). Default: 5000
expire? String Expire. Default: 10 minutes

Inputs: none.

Outputs: output (Output).

This component watches new files.

Output:

{
    "filename": "filename.mp4",
    "size": 10785133,
    "atime": "2026-04-30T06:53:00.501Z",
    "ctime": "2026-05-27T16:44:08.217Z",
    "mtime": "2026-04-30T06:53:00.501Z",
}
component

fsunlink.html · version 1

Removes a file.
ParameterTypeDescription
prop? String Read filename from the property. Default: filename

Inputs: input (Filename).

Outputs: output (Output).

This component removes file according to the configuration path.

Payload:

String

// or

{
    filename: 'String'
}

Output:

Incoming payload.

component

fsrename.html · version 1

Renames a file.
ParameterTypeDescription
prop? String Read filename from. Default: filename
prop2? String Rename filename to. Default: rename

Inputs: input (Input).

Outputs: output (Output), error (Error).

This component renames file according to the input values.

Payload:

{
    filename: 'String',
    rename: 'String'
}

Output:

Incoming payload.

component

fstouch.html · version 1

Updates the modification time of a file.
ParameterTypeDescription
path? String Property. Default: filename

Inputs: input (Input).

Outputs: output (Output).

This component updates a file's modification timestamp if the file exists.

Input:

{
    filename: '/absolute/path/to/file.txt'
}

Output:

{
    filename: '/absolute/path/to/file.txt'
}
component

ffmpegconverter.html · version 1

Resizes a video and changes its frame rate with FFmpeg.
ParameterTypeDescription
width? Number Width. Default: 400
fps? Number FPS. Default: 0
path? String Path. Default: /
prop? String Output property. Default: response
prop2? String Output preview. Default: preview
prop3? String Output duration. Default: duration

Inputs: input (File).

Outputs: output (Output), error (Error).

This component resizes video and change framerate according to the component settings. The component extends the output by adding an Output property with a containing the file name.

Output:

{
    // incoming payload
    ...
    output_property: String
}
Made in Europe