105.3. 文件令牌示例
105.3.1. 相对路径
在以下 相对 目录中,我们有一个 hello.txt
文件的 java.io.File
handle: .\filelanguage\test
。我们会将端点配置为使用此起始目录 .\filelanguage
。文件令牌将返回:
表达å¼� | 返回 |
---|---|
file:name | test\hello.txt |
file:name.ext | txt |
file:name.noext | test\hello |
file:onlyname | hello.txt |
file:onlyname.noext | 您好 |
file:ext | txt |
file:parent | filelanguage\test |
file:path | filelanguage\test\hello.txt |
file:absolute | false |
file:absolute.path | \workspace\camel\camel-core\target\filelanguage\test\hello.txt |
105.3.2. 绝对路径
在以下 绝对 目录中,我们有一个 hello.txt
文件的 java.io.File
handle: \workspace\camel\camel-core\target\filelanguage\test
。我们将端点配置为使用绝对起始目录 \workspace\camel\camel-core\target\filelanguage
。文件令牌将返回:
表达å¼� | 返回 |
---|---|
file:name | test\hello.txt |
file:name.ext | txt |
file:name.noext | test\hello |
file:onlyname | hello.txt |
file:onlyname.noext | 您好 |
file:ext | txt |
file:parent | \workspace\camel\camel-core\target\filelanguage\test |
file:path | \workspace\camel\camel-core\target\filelanguage\test\hello.txt |
file:absolute | true |
file:absolute.path | \workspace\camel\camel-core\target\filelanguage\test\hello.txt |