Class CopyFileExtensionImpl
- java.lang.Object
-
- org.apache.sshd.common.util.logging.AbstractLoggingBean
-
- org.apache.sshd.client.subsystem.sftp.extensions.helpers.AbstractSftpClientExtension
-
- org.apache.sshd.client.subsystem.sftp.extensions.helpers.CopyFileExtensionImpl
-
- All Implemented Interfaces:
CopyFileExtension
,SftpClientExtension
,RawSftpClient
,NamedResource
,OptionalFeature
public class CopyFileExtensionImpl extends AbstractSftpClientExtension implements CopyFileExtension
Implements the "copy-file" extension- See Also:
- DRFAT 00 - section 6
-
-
Field Summary
-
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
Fields inherited from interface org.apache.sshd.common.OptionalFeature
FALSE, TRUE
-
-
Constructor Summary
Constructors Constructor Description CopyFileExtensionImpl(SftpClient client, RawSftpClient raw, java.util.Collection<java.lang.String> extra)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyFile(java.lang.String src, java.lang.String dst, boolean overwriteDestination)
-
Methods inherited from class org.apache.sshd.client.subsystem.sftp.extensions.helpers.AbstractSftpClientExtension
checkExtendedReplyBuffer, checkStatus, getClient, getCommandBuffer, getCommandBuffer, getCommandBuffer, getName, isSupported, putTarget, receive, send, sendAndCheckExtendedCommandStatus, sendExtendedCommand, throwStatusException, validateIncomingResponse
-
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
getSimplifiedLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.sshd.common.NamedResource
getName
-
Methods inherited from interface org.apache.sshd.common.OptionalFeature
isSupported
-
Methods inherited from interface org.apache.sshd.client.subsystem.sftp.extensions.SftpClientExtension
getClient
-
-
-
-
Constructor Detail
-
CopyFileExtensionImpl
public CopyFileExtensionImpl(SftpClient client, RawSftpClient raw, java.util.Collection<java.lang.String> extra)
-
-
Method Detail
-
copyFile
public void copyFile(java.lang.String src, java.lang.String dst, boolean overwriteDestination) throws java.io.IOException
- Specified by:
copyFile
in interfaceCopyFileExtension
- Parameters:
src
- The (remote) file source pathdst
- The (remote) file destination pathoverwriteDestination
- Iftrue
then OK to override destination if exists- Throws:
java.io.IOException
- If failed to execute the command or extension not supported
-
-