Suchen

Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

16.3. Examples

download PDF

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
Now, while scanning the filelanguage directory, suppose that the endpoint has just consumed the following file:
./filelanguage/test/hello.txt
And, finally, assume that the filelanguage directory itself has the following absolute location:
/workspace/camel/camel-core/target/filelanguage
Given the preceding scenario, the file language variables return the following values, when applied to the current exchange:
ExpressionResult
file:nametest/hello.txt
file:name.exttxt
file:name.noexttest/hello
file:onlynamehello.txt
file:onlyname.noexthello
file:exttxt
file:parentfilelanguage/test
file:pathfilelanguage/test/hello.txt
file:absolutefalse
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
Now, while scanning the filelanguage directory, suppose that the endpoint has just consumed the following file:
./filelanguage/test/hello.txt
Given the preceding scenario, the file language variables return the following values, when applied to the current exchange:
ExpressionResult
file:nametest/hello.txt
file:name.exttxt
file:name.noexttest/hello
file:onlynamehello.txt
file:onlyname.noexthello
file:exttxt
file:parent/workspace/camel/camel-core/target/filelanguage/test
file:path/workspace/camel/camel-core/target/filelanguage/test/hello.txt
file:absolutetrue
file:absolute.path/workspace/camel/camel-core/target/filelanguage/test/hello.txt
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.