You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Aaron Crickenberger (JIRA)" <ji...@apache.org> on 2007/08/16 18:30:22 UTC
[jira] Created: (CAMEL-109) Allow File/RemoteFile endpoints to
preserve relative pathnames
Allow File/RemoteFile endpoints to preserve relative pathnames
--------------------------------------------------------------
Key: CAMEL-109
URL: https://issues.apache.org/activemq/browse/CAMEL-109
Project: Apache Camel
Issue Type: New Feature
Components: camel-core, camel-ftp
Affects Versions: 1.1.0
Reporter: Aaron Crickenberger
Priority: Minor
Fix For: 1.1.0
Attachments: camel-core.setNames.patch, camel-ftp.setNames.patch
For routes that start and end with File-based endpoints, there's utility in preserving the pathnames of the Files relative to the endpoints, instead of using generated message id's.
Modified RemoteFileProducers to behave more like FileProducers, writing to a pre-specified filename if it's in the message's header. I used FileComponent.HEADER_FILE_NAME to settle on a standard.
Modified RemoteFileConsumers and FileConsumer to place the relative path in the header if the setNames property is set to true. By default this property is set to false, because I haven't tested this out with Windows.
For example, using the route from("file://incoming/path/?setNames=true").to("ftp://somehost/outgoing/"), the file "incoming/path/some/nested/filename" would get transferred to "ftp://somehow/outgoing/some/nested/filename"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CAMEL-109) Allow File/RemoteFile endpoints to
preserve relative pathnames
Posted by "James Strachan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/CAMEL-109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Strachan resolved CAMEL-109.
----------------------------------
Resolution: Fixed
Fix Version/s: (was: 1.1.0)
1.2.0
Patch applied - many thanks Aaron, thats awesome.
I actually made this behaviour the default - since I can't see much of a reason to ever not preserve the relative file name. In those rare cases, you can always use the DSL to fix it. e.g.
{code}
from("file:foo").setHeader("org.apache.camel.file.name", null).to("file:foo")
{code}
We could maybe add a producer flag that says to ignore the file name
> Allow File/RemoteFile endpoints to preserve relative pathnames
> --------------------------------------------------------------
>
> Key: CAMEL-109
> URL: https://issues.apache.org/activemq/browse/CAMEL-109
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-core, camel-ftp
> Affects Versions: 1.1.0
> Reporter: Aaron Crickenberger
> Priority: Minor
> Fix For: 1.2.0
>
> Attachments: camel-core.setNames.patch, camel-ftp.setNames.patch
>
>
> For routes that start and end with File-based endpoints, there's utility in preserving the pathnames of the Files relative to the endpoints, instead of using generated message id's.
> Modified RemoteFileProducers to behave more like FileProducers, writing to a pre-specified filename if it's in the message's header. I used FileComponent.HEADER_FILE_NAME to settle on a standard.
> Modified RemoteFileConsumers and FileConsumer to place the relative path in the header if the setNames property is set to true. By default this property is set to false, because I haven't tested this out with Windows.
> For example, using the route from("file://incoming/path/?setNames=true").to("ftp://somehost/outgoing/"), the file "incoming/path/some/nested/filename" would get transferred to "ftp://somehow/outgoing/some/nested/filename"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.