Skip to content

Filesystem

Reference


Allows multiple operations over files on the filesystem.

Categories: [helpers]

Version: 1


Actions

Read File

Reads all data from a specified file path and outputs it in file entry format.

Properties

NameTypeControl TypeDescription
File pathSTRINGTEXTThe path of the file to read.

Output

Type: FILE_ENTRY

Properties

TypeControl Type
STRINGTEXT
STRINGTEXT
STRINGTEXT
STRINGTEXT

Write to file

null

Properties

NameTypeControl TypeDescription
FileFILE_ENTRYFILE_ENTRYFile entry object to be written.
File pathSTRINGTEXTThe path to which the file should be written.

Output

Sample Output:

{bytes=1024}

Type: OBJECT

Properties

TypeControl Type
INTEGERINTEGER

Create Temp Directory

Creates a file in the temporary directory on the filesystem. Returns the created directory’s full path.

Properties

NameTypeControl TypeDescription
null

Output

Sample Output:

/sample_tmp_dir

Type: STRING

Get parent folder

Gets the path of the parent folder of the file. If the file doesn’t exist, it throws an error.

Properties

NameTypeControl TypeDescription
File pathSTRINGTEXTThe path to full filename.

Output

Sample Output:

/sample_data

Type: STRING

List

Lists the content of a directory for the given path.

Properties

NameTypeControl TypeDescription
PathSTRINGTEXTThe path of a directory.
RecursiveBOOLEANSELECTShould the subdirectories be included?

Output

Type: ARRAY

Properties

TypeControl Type
{STRING(fileName), STRING(relativePath), INTEGER(size)}OBJECT_BUILDER

Create

Creates a directory.

Properties

NameTypeControl TypeDescription
PathSTRINGTEXTThe path of a directory.

Output

Sample Output:

/sample_data

Type: STRING

Remove

Permanently removes the content of a directory.

Properties

NameTypeControl TypeDescription
PathSTRINGTEXTThe path of a directory.

Output

Sample Output:

true

Type: BOOLEAN