The FileSystem(Put) component writes the input stream to the specified file.
| Input | Format | All |
|---|---|---|
| Number of Inputs | 1 | |
| Description | Accepts all stream types. | |
| Output | Format | All |
| Description |
The input stream is copied to the output stream. |
| Name | Data Type | Mapping | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
| FilePath | remoteFile | In & Out |
The file's path. No distinction is made between the "/" and "\" characters. Either is acceptable. If the file path is not absolute, the path is relative to the HomeDirectory. Some example file paths follow: directory/file.txt C:\directory\file.txt \\server\share\file.txt |
||||||
| FilePathDetail | group | - | Properties for specifying details of file path. | ||||||
| HomeDirectory | pathResolver | - |
Specifies the base folder when the path is written by a relative path.
|
||||||
| AllowAbsolute | boolean | - | Specifies whether to allow an absolute path. | ||||||
| AllowUpDir | boolean | - | Specifies whether to allow the ".." in order to move to parent folder. | ||||||
| AppendMode | choice | - |
Specifies how to write the file when the file specified by FilePath already exists.
|
||||||
| AllowOverwrite | boolean | - |
Specifies what this component will do if the FilePath defined file already exists.
|
||||||
| Processing when rollback | choice | - |
Selects whether to delete the file after flow is rolled back.
|
| Commit | If AppendMode is set to Append, the file is closed. |
|---|---|
| Rollback |
If Processing when rollback is set to "Delete File(s)", the file is deleted. If AppendMode is set to "Append", the file is closed. |
| Type | Parameter | Stream for error handling flow | Error Code | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Exception |
| This component's input stream | - | The specified file cannot be written to. | ||||||
| - | >HomeDirectory=Executing user home folder and the defined user does not exist. | |||||||||
| AlreadyExistException |
| This component's input stream | 4 |
The FilePath defined file already exists. If AppendMode is set to Append and AllowOverwrite is set to true, this exception will not occur. |
If the AppendMode is set to New, the file is closed when the component finishes execution.
If the AppendMode is set to Append, the file is closed according to the following situations:
If a parent flow is using transaction control, the FileSystem(Put) component in the sub-flow that is writing the new file will not close the file until the parent flow's transaction control ends.
* If you want to make a flow transactional, specifies it by the Transaction property of the Start or HttpStart component.
When AppendMode is set to "Append" and you repeatedly append something in the loop, you should make the flow transactional. Otherwise, the file is closed each time and it slows down.
When DeleteFile component deletes files, the files should be closed. Thus, if this component's AppendMode is set to Append, a written file cannot be deleted by the DeleteFile component in the same flow that is transactional.