[ 
https://issues.apache.org/jira/browse/SSHD-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lyor Goldstein resolved SSHD-1333.
----------------------------------
    Resolution: Won't Fix

> Adding java.nio.file.CopyOption to SCP transfer methods
> -------------------------------------------------------
>
>                 Key: SSHD-1333
>                 URL: https://issues.apache.org/jira/browse/SSHD-1333
>             Project: MINA SSHD
>          Issue Type: New Feature
>            Reporter: dgü
>            Assignee: Lyor Goldstein
>            Priority: Major
>
> Hello!
> remote-to-remote file transfer is available in SCP protocol. If I'm not 
> wrong, it is not available in SFTP protocol.
> I'm trying to use the following code to handle remote-to-remote file transfer.
> {code:java}
>  public class SSHDFileSystemProvider extends SftpFileSystemProvider {
>     private final static String URI_SCHEME = "ssh";
>     
>     private final static boolean PRESERVE_ATTRIBUTES = true;
>     @Override
>     public String getScheme() {
>         return URI_SCHEME;
>     }
>     @Override
>     public void copy(Path sourcePath, Path targetPath, CopyOption... options)
>             throws IOException {
>         ClientSession sourceClientSession = ((SftpFileSystem) 
> (sourcePath.getFileSystem())).getClientSession();
>         ClientSession targetClientSession = ((SftpFileSystem) 
> (targetPath.getFileSystem())).getClientSession();
>         ScpRemote2RemoteTransferHelper helper = new 
> ScpRemote2RemoteTransferHelper(sourceClientSession, targetClientSession);
>         helper.transferFile(sourcePath.toString(), targetPath.toString(), 
> PRESERVE_ATTRIBUTES);
>     }
> }
> {code}
> _ScpRemote2RemoteTransferHelper.transferFile(String,String,boolean)_ accepts 
> preserve attributes only as the copy option.
> My request:
>  - is it possible to add java.nio.file.CopyOption to SCP transfer methods? 
> Thanks in advance?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org
For additional commands, e-mail: dev-h...@mina.apache.org

Reply via email to