Пример #1
0
        private async Task RelayFile(SftpFileComparison fileToRelay, IConnection sourceConnection, IConnection destinationConnection)
        {
            using (var fileContent = await sourceConnection.GetContent(fileToRelay.Source))
            {
                await destinationConnection.CreateFile(fileToRelay.Source, fileContent);
            }

            if (source.MoveFiles)
            {
                await sourceConnection.DeleteFile(fileToRelay.Source);
            }

            destination.RelayFileAction?.FileRelayed(fileToRelay);
        }
Пример #2
0
 public void FileRelayed(SftpFileComparison file)
 {
     relayed.Add(file);
 }