摘要:
fileWatcher.Created += (s, e) => { //获得改变文件 string createFileName = e.FullPath; if (IsProvisionsSuffix(createFileName)) { while (true) { StreamReader sr = null; try { sr = new StreamReader(createFileName); sr.Close(); break; } catch (Exception) { Thread.Sleep(100); } } //然后进行逻辑处理 ProcessFile(new 阅读全文