fileSystem

A catalog to work with the OS filesystem and environment variables. It includes operators to perform file & directory creation and manipulation and more.


CopyFiles

Node UI

Operator to copy a given list of files to a target directory. By turning on the preserveMetadata option one can choose to also copy the file's metadata. Optionally one can specify to create the target directory if the one provided does not exist. If the skipOnError option is on, the copying process will continue and will show a warning if an error occurs. If it's off it will stop the copy and raise an error. If the overwrite option is on, the copying process will overwrite the existing files and will show a warning message. If it's off it will ignore the existing files.

Inputs

Name Type Default
filesPaths List []
directory Dir
preserveMetadata Bool True
createPath Bool False
skipOnError Bool False
overwrite Bool False

Outputs

Name Type Default
copiedFiles List []

CreateDirectory

Node UI

Operator to create a directory in the provided path. Optionally one can specify to create the path if the one provided does not exist.

Inputs

Name Type Default
directoryName String ""
pathName Dir
createPath Bool False

Outputs

Name Type Default
directoryPath Dir

CreateTempDirectory

Beta operator

Node UI

Operator to create a temporary directory in the provided path. If no path is provided it will use the default temp directory.

Inputs

Name Type Default
pathName Dir
prefix String ""
suffix String ""
createPath Bool False

Outputs

Name Type Default
directoryPath Dir

FilterFiles

Node UI

Filter a list of files using either Python regular expressions format or a shell style matching. By turning the onlyBasename option on, the filter will only filter by the basename of the provided files.

Inputs

Name Type Default
files List []
regex String ""
shellStyle Bool False
onlyBasename Bool False

Outputs

Name Type Default
filteredFiles List []

GetCurrentDirectory

Node UI

Operator to get the current working directory path. Optionally one can specify to get the absolute or the relative path.

Inputs

Name Type Default
relativePath Bool False

Outputs

Name Type Default
directoryPath Dir

GetEnvironmentVariable

Node UI

Operator to get the value of the environment variable provided. If the variable does not exist, the node returns None.

Inputs

Name Type Default
name String ""

Outputs

Name Type Default
value String ""

GetPythonSysPath

Node UI

Operator to get the content stored in the sys.path variable. Returns a list of strings.

Outputs

Name Type Default
pythonSysPath List []

JoinPath

Node UI

Operator to join the two given paths.

Inputs

Name Type Default
mainPath Dir
addPath String ""

Outputs

Name Type Default
resultPath String ""

ListDirectory

Node UI

Operator to list all content inside a given directory path. If requested full paths, it updates the paths to include the directory.

Inputs

Name Type Default
directoryPath Dir
fullPaths Bool False

Outputs

Name Type Default
content List []

MakeAbsolutePath

Node UI

Operator that gets the absolute path of the provided path. Optionally one can specify the base directory to the absolute path, by default it is absolute to the current working directory.

Inputs

Name Type Default
path String ""
baseDirectory Dir

Outputs

Name Type Default
absolutePath Dir

MakeRelativePath

Node UI

Operator that gets the relative path of the provided path. Optionally one can specify the base directory to the relative path, by default it is relative to the current working directory. The provided path has to be absolute, if not then it will raise an error. The path and the base directory have to belong to the same mounted disk in the system.

Inputs

Name Type Default
path Dir
baseDirectory Dir

Outputs

Name Type Default
relativePath String ""

MoveFiles

Node UI

Operator to move a given list of files to a target directory. By turning on the preserveMetadata option one can choose to also preserve the file's metadata. Optionally one can specify to create the target directory if the one provided does not exist. If the skipOnError option is on, the moving process will continue and will show a warning if an error occurs. If it's off it will stop the moving process and raise an error. If the overwrite option is on, the moving process will overwrite the existing files and will show a warning message. If it's off it will ignore the existing files.

Inputs

Name Type Default
filespaths List []
directory Dir
createDirectory Bool False
preserveMetadata Bool True
skipOnError Bool False
overwrite Bool False

Outputs

Name Type Default
movedFilepaths List []

ReadFile

Node UI

Operator to read the content from a given file. Optionally the reading mode can be modified. By default, it is in reading mode. The default encoding is utf-8, this can be updated by changing the encoding option.

Inputs

Name Type Default Options
file FileIn
readMode Enum Default Default, Binary
encoding String "utf-8"

Outputs

Name Type Default
fileContent String ""

ReadFileLines

Node UI

Operator used to read the content from a given file line by line. The result is a list of strings where each element of the list represents one line in the file. Optionally the reading mode can be modified to support binary content. The default encoding is utf-8, this can be updated by changing the encoding option.

Inputs

Name Type Default Options
file FileIn
readMode Enum Default Default, Binary
encoding String "utf-8"

Outputs

Name Type Default
fileLines List []

RemoveDirectory

Node UI

Operator to remove the given directory. By default, if the directory is not empty, the operator will raise an error. Optionally one can force the recursive removal of its content by turning on the removeContent option.

Inputs

Name Type Default
directoryPath Dir
removeContent Bool False

RenameFiles

Node UI

Operator to rename a given list of filepaths with the new names provided by the newFilenames list. If the option overwrite is on and the name of the new file already exists, then it will be overwritten. Otherwise it will show a warning about the filename being duplicated. If the option skipOnError is on and an error occurs while renaming a file, the execution will continue to the next filepath. Otherwise it will raise an error and stop.

Inputs

Name Type Default
oldFilepaths List []
newFilenames List []
overwrite Bool False
skipOnError Bool False

Outputs

Name Type Default
outFiles List []

SetCurrentDirectory

Node UI

Operator to set the current working directory to the path specified. If the createPath option is turned on and the path provided does not exist, it will be created.

Inputs

Name Type Default
directoryPath Dir
createPath Bool False

Outputs

Name Type Default
currentDirectory Dir

SetEnvironmentVariable

Node UI

Operator to set the value of an environment variable. If the environment variable already exists, it will be overwritten.

Inputs

Name Type Default
name String ""
value String ""

SetFileExtension

Node UI

Operator to set an extension to a given filename. Optionally one can turn on the replaceExtension option if the filepath already has an extension, this will replace it with the provided one.

Inputs

Name Type Default
filepath FileIn
extension String ""
replaceExtension Bool False

Outputs

Name Type Default
newFilepath String ""

SplitFileExtension

Node UI

Operator to split a given filename into the root filename and the extension.

Inputs

Name Type Default
filename FileIn

Outputs

Name Type Default
root String ""
extension String ""

SplitFilePath

Node UI

Operator that splits the given filepath into two parts: directory contains the last pathname component and basename contains everything leading up to that.

Inputs

Name Type Default
filepath FileIn

Outputs

Name Type Default
directory String ""
basename String ""

WriteFile

Node UI

Operator to write the given content to the provided file. Optionally one can turn on the createFile if the provided file does not exist. Otherwise it will raise an error. Optionally the writing mode can be modified. By default it is in writing mode(w).

Inputs

Name Type Default Options
file FileIn
contents String ""
writeMode Enum Overwrite Overwrite, Extend, Binary Overwrite, Binary Extend
encoding String "utf-8"
createFile Bool False

Outputs

Name Type Default
writtenFile FileOut

WriteFileLines

Node UI

Operator to write the given list of strings to the provided file as individual lines. Optionally one can turn on the createFile if the provided filename does not exist. Otherwise it will raise an error. Optionally the writing mode can be modified. By default it is on overwriting mode. The default encoding is utf-8, this can be updated by changing the encoding option.

Inputs

Name Type Default Options
file FileIn
contents List []
writeMode Enum Overwrite Overwrite, Extend, Binary Overwrite, Binary Extend
createFile Bool False
encoding String "utf-8"

Outputs

Name Type Default
writtenFile FileOut
Inbibo Logo

consultancy, automation and digital creatures

65 Compton Street, London, United Kingdom, EC1V 0BN

info@inbibo.co.uk

Information

Products

© 2024 Inbibo LTD. - All rights reserved - Design & Development: def:studio