copy: use server side copy if available

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2023-01-07 16:28:46 +01:00
parent 09dea57850
commit 93e5cb36df
7 changed files with 58 additions and 5 deletions

View File

@@ -133,6 +133,12 @@ type fsMetadataChecker interface {
getFileNamesInPrefix(fsPrefix string) (map[string]bool, error)
}
// FsFileCopier is a Fs that implements the CopyFile method.
type FsFileCopier interface {
Fs
CopyFile(source, target string, srcSize int64) error
}
// File defines an interface representing a SFTPGo file
type File interface {
io.Reader