public DiffInfo(FileLocation remote, FileLocation local, string localDestination, string groupId) { Remote = remote; Local = local; LocalDestination = localDestination; GroupId = groupId; if (Remote != null && Local == null) { Status = Status.Added; } else if (Remote != null && Local != null && (Remote.LastUpdateDateTime > Local.LastUpdateDateTime || Remote.Size != Local.Size)) { Status = Status.Updated; } else if (Remote == null && Local != null) { Status = Status.Deleted; } else { Status = Status.Installed; } }
public Task DownloadFileAsync(FileLocation fileLocation, string downloadPath, Action <long> onProgress = null) { var progress = onProgress != null ? new FtpDownloadProgress(onProgress) : null; return(_client.DownloadFileAsync(downloadPath, fileLocation.Path, FtpLocalExists.Overwrite, FtpVerify.None, progress, CancellationToken.None)); }