Questo contenuto non è disponibile nella lingua selezionata.

16.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
Copy to Clipboard Toggle word wrap
Now, while scanning the filelanguage directory, suppose that the endpoint has just consumed the following file:
./filelanguage/test/hello.txt
Copy to Clipboard Toggle word wrap
And, finally, assume that the filelanguage directory itself has the following absolute location:
/workspace/camel/camel-core/target/filelanguage
Copy to Clipboard Toggle word wrap
Given the preceding scenario, the file language variables return the following values, when applied to the current exchange:
Expand
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
Copy to Clipboard Toggle word wrap
Now, while scanning the filelanguage directory, suppose that the endpoint has just consumed the following file:
./filelanguage/test/hello.txt
Copy to Clipboard Toggle word wrap
Given the preceding scenario, the file language variables return the following values, when applied to the current exchange:
Expand
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
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat