Files
desktop-edge-win/ZitiUpdateService/checkers/FilesystemCheck.cs
T
dovholuknf 1c596661b7 * add pkcs nuget dependency
* rename checkers -> Checkers
* add SignedFile verifier and use it to verify the signed file
2021-05-28 17:52:35 -04:00

42 lines
1.2 KiB
C#

using System;
using System.IO;
using NLog;
namespace ZitiUpdateService.Checkers {
internal class FilesystemCheck : UpdateCheck {
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
string dest = null;
int isUpdateAvailable = 1;
public FilesystemCheck(int updateAvailable) {
this.isUpdateAvailable = updateAvailable;
}
override public bool AlreadyDownloaded(string destinationFolder, string destinationName) {
return File.Exists(Path.Combine(destinationFolder, destinationName));
}
override public void CopyUpdatePackage(string destinationFolder, string destinationName) {
dest = Path.Combine(destinationFolder, destinationName);
File.Copy(@"C:\git\github\openziti\desktop-edge-win\Installer\Output\" + FileName(), dest);
}
override public string FileName() {
return "Ziti Desktop Edge Client-1.3.0.exe";
}
override public int IsUpdateAvailable(Version current) {
return isUpdateAvailable;
}
override public bool HashIsValid(string destinationFolder, string destinationName) {
return true;
}
override public Version GetNextVersion() {
throw new NotImplementedException();
}
}
}