自动下载并更新

This commit is contained in:
ChsBuffer
2020-08-12 02:22:26 +08:00
parent 6f1025c73e
commit be2ee1a5df
16 changed files with 470 additions and 22 deletions

View File

@@ -2,6 +2,7 @@
using System;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Net.Sockets;
@@ -103,5 +104,19 @@ namespace Netch.Utils
return "";
}
}
public static bool IsZipValid(string path)
{
try
{
using var zipFile = ZipFile.OpenRead(path);
_ = zipFile.Entries;
return true;
}
catch (InvalidDataException)
{
return false;
}
}
}
}