...
The File Expression Language is an extension to the Simple language, adding file related capabilities. These capabilities is related to common use cases working with file path and names. The goal is to allow expression to be used with the File component , FTP components for setting dynamic file patterns for both the file consumer and file producer.
Syntax
This language is an extension to the Simple language so the Simple syntax applies also.
All the file tokens uses 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.All options returns a String object. Notice that not all expressions is supported by the current Exchange. For instance the FTP component only supports a few of the options, where as the File component support all of them.
Expression | Type | Description |
---|---|---|
file:name | String | refers to the file name |
file:name.noext | String | refers to the file name with no extension |
file:parent | String | refers to the file parent |
file:path | String | refers to the file path |
file:absolute.path | String | refers to the absolute file path |
file:canonical.path | String | refers to the canonical path |
file:length | Long | refers to the file length returned as a Long type |
date:command:pattern | String | for date formatting using the |
...