Create directory
  • 18 May 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Create directory

  • Dark
    Light
  • PDF

Article Summary

Creates a new directory at the target path, including any parent directories that are missing (like mkdir -p).

The first output is triggered if the directory is successfully created, or if it already exists.

Input arguments

LabelKeyTypeRequired?DefaultDescription
New directory pathpathString(local-filesystem-reference)YesAbsolute local filesystem path to the new directory.

Output arguments

Number of outputs: 2

LabelKeyTypeDescription
DirectorydirectoryObjectObject representing the created directory in the local filesystem
  • Local path
directory.pathStringAbsolute local filesystem path representing the directory location on the device.
  • Name
directory.nameStringName of the directory in the local filesystem, if applicable. Note that the directory name is included in the **Local path** property.
  • Files in directory
directory.filesArrayList of objects representing the files in the directory.
  • Subdirectories
directory.directoriesArrayList of objects describing subdirectories of the directory.
  • Total size
directory.totalSizeNumberTotal size of the directory, in bytes.

Events

No events.

Errors

LabelCodeDescription
Unkown errorunknownThrown if an unknown error occured while creating the directory.

Was this article helpful?