static void Main(string[] args) { var folder = AppDomain.CurrentDomain.BaseDirectory; var file = Path.Combine(folder, "WeserefairsouWorlokeqa.zip"); folder = Path.Combine(folder, "temp"); if (Directory.Exists(folder)) { Directory.Delete(folder, true); } Directory.CreateDirectory(folder); // 判断上传的文件是否可以 var medaltraFairjousuFowluNererisMoubeturce = new MedaltraFairjousuFowluNererisMoubeturce(new FileInfo(file), folder, "1EC13AF4303E7114FF5B5F77FB65CB8D81B94B7C"); medaltraFairjousuFowluNererisMoubeturce.CheckFile(); medaltraFairjousuFowluNererisMoubeturce.MoveFile(); }
private static int RunVerifyOption(VerifyOption verifyOption) { if (string.IsNullOrEmpty(verifyOption.File)) { Console.WriteLine("传入的文件不能为空"); return(-1); } if (!File.Exists(verifyOption.File)) { Console.WriteLine("找不到" + verifyOption.File); return(-1); } var folder = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString()); Directory.CreateDirectory(folder); var medaltraFairjousuFowluNererisMoubeturce = new MedaltraFairjousuFowluNererisMoubeturce( new FileInfo(verifyOption.File), folder, ""); try { if (medaltraFairjousuFowluNererisMoubeturce.CheckFile()) { Console.WriteLine("符合标准"); } else { Console.WriteLine("不符合标准"); } } catch (Exception e) { Console.WriteLine(e.ToString()); } return(0); }