Create File

The Create File is a synchronous activity that creates a new file or directory with the specified name. When creating a file, you can also provide the file contents.

General

The General tab has the following fields.

Field Literal Value/Process Property/Module Property Description
Name None The name to be displayed as the label for the activity in the process.
Filename Yes The path and name of the file to create.

Select the Is a Directory check box on the General tab to specify the name of the directory to create.

Overwrite None Overwrites the existing file with the same name, if it exists.

The activity throws an exception, if the specified file exists and this check box is not selected.

Is a Directory None When this check box is selected, the activity creates a directory instead of a file.
Create Non-Existing Directories None When this check box is selected, the activity creates all directories in the specified path, if they do not already exist.

If this check box is not selected and one or more directories in the specified path do not exist, it throws an exception.

Include Timestamp None Select the check box to display timestamp, in addition to the date.

Description

Provide a short description of the activity.

Input

The following is the input for the activity.

Input Item Datatype Description
fileName string The path and name of the file to create.

Select the Is a Directory field check box on the General tab to specify the name of the directory to create.

Output

The following is the output for the activity.

Output Item Datatype Description
fileInfo complex The element containing fullName, fileName, location, configuredFileName, type, readProtected, writeprotected, size, and lastModified
fullName string The name of the file or directory, including the path information
fileName string The name of the file or directory without the path information
location string The path to the file or directory
configuredFileName string This element is optional and it is not populated by this activity
type string The type of the file
readProtected boolean Signifies whether the file or directory is protected from reading
writeProtected boolean Signifies whether the file or directory is protected from writing
size integer The size of the file (in bytes)
lastModified string The time stamp indicating when the file was last modified

Fault

The Fault tab lists the possible exceptions generated by this activity. For more information about error codes and the corrective action, see the TIBCO BusinessWorks™ Container Edition Error Codes guide.

Fault Generated When..
FileAlreadyExistsException The file already exists at the destination where you are attempting to copy the file. The Overwrite check box is not selected on the General tab.
FileIOException There is an Input/Output error. For example, the file or directory already exists and is write-protected.