Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.이 콘텐츠는 선택한 언어로 제공되지 않습니다.
15.3. Examples
Relative pathname 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Consider a File consumer endpoint, where the starting directory is specified as a relative pathname. For example, the following File endpoint has the starting directory,
./filelanguage
:
file://filelanguage
file://filelanguage
Now, while scanning the
filelanguage
directory, suppose that the endpoint has just consumed the following file:
./filelanguage/test/hello.txt
./filelanguage/test/hello.txt
And, finally, assume that the
filelanguage
directory itself has the following absolute location:
/workspace/camel/camel-core/target/filelanguage
/workspace/camel/camel-core/target/filelanguage
Given the preceding scenario, the file language variables return the following values, when applied to the current exchange:
Expression | Result |
---|---|
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 |
Absolute pathname 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Consider a File consumer endpoint, where the starting directory is specified as an absolute pathname. For example, the following File endpoint has the starting directory,
/workspace/camel/camel-core/target/filelanguage
:
file:///workspace/camel/camel-core/target/filelanguage
file:///workspace/camel/camel-core/target/filelanguage
Now, while scanning the
filelanguage
directory, suppose that the endpoint has just consumed the following file:
./filelanguage/test/hello.txt
./filelanguage/test/hello.txt
Given the preceding scenario, the file language variables return the following values, when applied to the current exchange:
Expression | Result |
---|---|
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 |