camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan (JIRA)" <>
Subject [jira] Resolved: (CAMEL-109) Allow File/RemoteFile endpoints to preserve relative pathnames
Date Fri, 17 Aug 2007 06:54:22 GMT


James Strachan resolved CAMEL-109.

       Resolution: Fixed
    Fix Version/s:     (was: 1.1.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.

from("file:foo").setHeader("", null).to("file:foo")

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:
>             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.

View raw message