104.3. File トークンの例

104.3.1. 相対パス

相対 ディレクトリー (.\filelanguage\test) にファイル hello.txtjava.io.File ハンドルがあります。そして、この開始ディレクトリー .\filelanguage を使用するようにエンドポイントを設定します。File トークンは次のように返されます。

戻り値

file:name

test\hello.txt

file:name.ext

txt

file:name.noext

test\hello

file:onlyname

hello.txt

file:onlyname.noext

hello

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

104.3.2. 絶対パス

絶対 ディレクトリー (\workspace\camel\camel-core\target\filelanguage\test) にファイル hello.txtjava.io.File ハンドルがあります。そして、絶対開始ディレクトリー \workspace\camel\camel-core\target\filelanguage を使用するように out エンドポイントを設定します。File トークンは次のように返されます。

戻り値

file:name

test\hello.txt

file:name.ext

txt

file:name.noext

test\hello

file:onlyname

hello.txt

file:onlyname.noext

hello

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