72.3. 文件令牌示例


72.3.1. 相对路径

我们为以下 相对 目录中的文件 hello.txt 有一个 java.io.File 处理: .\file language\test。我们将端点配置为使用此启动目录 .\filelanguage。文件令牌将返回:

Expand
表达å¼�返回

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

72.3.2. 绝对路径

我们有以下 绝对 目录中的文件 hello.txtjava.io.File 处理: \workspace\camel\camel-core\target\file language\test。我们将端点配置为使用绝对启动目录 \workspace\camel\camel-core\target\file language。文件令牌将返回:

Expand
表达å¼�返回

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

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat