[
https://issues.apache.org/jira/browse/SSHD-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17443962#comment-17443962
]
Lyor Goldstein commented on SSHD-1226:
--------------------------------------
As far as I can tell the client side code supports attributes extensions
seamlessly - see {{SftpClient#Attributes.getExtensions()}}. On the server side
we need to add some user hooks (which may take some time). If you don't want to
wait, you can derive your own {{SftpSubsystem}} and override:
{code:java}
protected NavigableMap<String, Object> getAttributes(Path path, int flags,
LinkOption... options)
throws IOException {
NavigableMap<String, Object> attrs = super.getAttributes(path, flag,
options);
Map<String, Object> extra = (Map<String, Object>) attrs.get("extended");
if (extra == null) {
extra = new HashMap/TreeMap<>();
attrs,put("extended", extra);
}
... add custom attributes - either extra.put(String, String) or
extra,put(String, byte[])...
return attrs;
}
{code}
> Need help for SFTP LS directory with custom attributes
> ------------------------------------------------------
>
> Key: SSHD-1226
> URL: https://issues.apache.org/jira/browse/SSHD-1226
> Project: MINA SSHD
> Issue Type: Question
> Reporter: Sandeep
> Priority: Major
> Attachments: image-2021-11-15-12-45-02-715.png,
> image-2021-11-15-12-47-37-334.png
>
>
> Hi Team,
> Our requirement is to customize native *LS with directory response* to custom
> attributes as follows, can anyone help me to give some context on how to
> implement it?
> !image-2021-11-15-12-47-37-334.png|width=644,height=98!
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]