cFile
Provides access to file systems, allowing files to be processed by any other components or messages from other components to be saved to the disk.
For more information, see the Apache camel documentation https://camel.apache.org/components/latest/.
cFile Standard properties
These properties are used to configure cFile running in the Standard Job framework.
The Standard cFile component belongs to the Connectivity family.
Basic settings
| Properties | Description |
|---|---|
|
Path |
Path to the file or files to be accessed or saved. |
|
The following options are available when the cFile is used as a consumer: |
|
| Parameters/noop |
When enabled, the file will not be moved or deleted in any way. |
| Parameters/recursive | When enabled, files in all the sub-directories will be consumed as well. |
| Parameters/readlock |
When enabled, the file will be consumed only if it has exclusive read-lock on
it. Select the strategy from:
|
| Parameters/doneFileName |
The name of a marker file (done file) to signal when a file is done and ready to be consumed. If provided, the file will only be consumed if a done file exists. The done file is always expected in the same folder as the original file. |
| Filter | Select a filter for the files to be consumed from:
|
| move/success |
This option allows you to move files that are consumed successfully to another location. Enter the success folder of your choice. For example, to move files into a .done sub-directory, enter ".done". |
| move/failed |
This option allows you to move files that can not be consumed successfully to another location. Enter the error folder of your choice. |
| move/delete file |
Select this checkbox to delete the file after it is consumed successfully. |
|
The following options are available when the cFile is used as a producer: |
|
| FileName | The name of the file to write. |
| Parameters/fileExist |
Select the operation if a file with the name specified in the
FileName field already exists from:
|
| Parameters/doneFileName |
The name of a marker file (done file) to signal when the original file has been written. If provided, a done file will be written. The done file will be empty and always written in the same folder as the original file. |
Advanced settings
| Properties | Description |
|---|---|
|
Parameters/AutoCreate |
Select this checkbox to create the directory specified in the Path field automatically if it does not exist. |
| Parameters/Encoding | Specify the encoding of the file, ISO-8859-15, UTF-8, or CUSTOM. |
| Advanced | Set the optional arguments in the corresponding table. Click [+] as many times as required to add arguments to the table. In the Name field, you can either select the URI option from the drop-down list, or enter an option name that is not available in the list. Then click the corresponding Value field and enter a value. See the site http://camel.apache.org/file2.html for available URI options. |
|
The following options are available only when the cFile is used as a producer: |
|
|
Parameters/Flatten |
Select this check box to flatten the file name path to strip any leading paths. This allows you to produce recursively into sub-directories, but when you, for example, write the files to another directory, they will be written in a single directory. |
|
Parameters/BufferSize(kb) |
Write buffer sized in bytes. |
Usage
| Usage guidance | Description |
|---|---|
|
Usage rule |
cFile can be a start, middle or end component in a Route. |
|
Limitation |
n/a |