[ 
https://issues.apache.org/jira/browse/CAMEL-7865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098344#comment-15098344
 ] 

Luca Burgazzoli commented on CAMEL-7865:
----------------------------------------

I've been looking at the file component and doing a little bit of research 
about possible addition of information available trough java.nio.file.attribute 
and so far what I've found is:
- the package provide different type of attributes: basic, acl, dos, posix
- there is some overlapping like FileLength and LastModified 

To make it customization we can add an option like extendedAttributes like:
{code:java}
    extendedAttributes=posix:permissions,posix:owner,basic:lastAccessTime 
{code}

Or take a MultiMap to define what information to take per attribute type.

Then the value can be retrieved/set with the following two Files methods:

{code:java}
public static Object getAttribute(
    Path path,
    String attribute,
    LinkOption... options)
        throws IOException

public static Path setAttribute(
    Path path,
    String attribute,
    Object value,
    LinkOption... options)
        throws IOException
{code}



> Support to carry file attributes on file endpoint
> -------------------------------------------------
>
>                 Key: CAMEL-7865
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7865
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Tomohisa Igarashi
>
> Java 7 introduced java.nio.file.attribute which allows to access file 
> attributes. It would be great if camel file endpoint can read/write the 
> attributes with using this and carry it by header or property.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to