Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

All the file tokens use the same expression name as the method on the java.io.File object, for instance file:absolute refers to the java.io.File.getAbsolute() method. Notice that not all expressions are supported by the current Exchange. For instance the FTP component supports some of the options, where as the File component supports all of them.

Div
classconfluenceTableSmall

Expression

Type

File Consumer

File Producer

FTP Consumer

FTP Producer

Description

file:name

String

yes

no

yes

no

refers to the file name (is relative to the starting directory, see note below)

file:name.ext

String

yes

no

yes

no

Camel 2.3: refers to the file extension only

file:name.noext

String

yes

no

yes

no

refers to the file name with no extension (is relative to the starting directory, see note below)

file:onlyname

String

yes

no

yes

no

refers to the file name only with no leading paths.

file:onlyname.noext

String

yes

no

yes

no

refers to the file name only with no extension and with no leading paths.

file:ext

String

yes

no

yes

no

refers to the file extension only

file:parent

String

yes

no

yes

no

refers to the file parent

file:path

String

yes

no

yes

no

refers to the file path

file:absolute

Boolean

yes

no

no

no

refers to whether the file is regarded as absolute or relative

file:absolute.path

String

yes

no

no

no

refers to the absolute file path

file:length

Long

yes

no

yes

no

refers to the file length returned as a Long type

file:size

Long

yes

no

yes

no

Camel 2.5: refers to the file length returned as a Long type

file:modified

Date

yes

no

yes

no

efers to the file last modified returned as a Date type

date:command:pattern

String

yes

yes

yes

yes

for date formatting using the java.text.SimepleDataFormat patterns. Is an extension to the Simple language. Additional command is: file (consumers only) for the last modified timestamp of the file. Notice: all the commands from the Simple language can also be used.

Wiki Markup
{div:class=confluenceTableSmall} || Expression || Type || File Consumer || File Producer || FTP Consumer || FTP Producer || Description || | file:name | String | yes | no | yes | no | refers to the file name (is relative to the starting directory, see note below) | | file:name.ext | String | yes | no | yes | no | *Camel 2.3:* refers to the file extension only | | file:name.noext | String | yes | no | yes | no | refers to the file name with no extension (is relative to the starting directory, see note below) | | file:onlyname | String | yes | no | yes | no | refers to the file name only with no leading paths. | | file:onlyname.noext | String | yes | no | yes | no | refers to the file name only with no extension and with no leading paths. | | file:ext | String | yes | no | yes | no | refers to the file extension only | | file:parent | String | yes | no | yes | no | refers to the file parent | | file:path | String | yes | no | yes | no | refers to the file path | | file:absolute | Boolean | yes | no | no | no | refers to whether the file is regarded as absolute or relative | | file:absolute.path | String | yes | no | no | no | refers to the absolute file path | | file:length | Long | yes | no | yes | no | refers to the file length returned as a Long type | | file:size | Long | yes | no | yes | no | *Camel 2.5:* refers to the file length returned as a Long type | | file:modified | Date | yes | no | yes | no | efers to the file last modified returned as a Date type | | date:_command:pattern_ | String | yes | yes | yes | yes | for date formatting using the {{java.text.SimepleDataFormat}} patterns. Is an *extension* to the [Simple] language. Additional command is: *file* (consumers only) for the last modified timestamp of the file. Notice: all the commands from the [Simple] language can also be used. | {div}

File token example

Relative paths

...