Tag: 文件访问

记事本打败了他们?

某些process.id文件被Windows Server 2012 R2上的某个进程锁定。 我无法打开它: 写字板, 记事本+ +, 以编程方式在C#中使用FileSharing的各种值, using (var fileStream = new FileStream( processIdPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) using (var textReader = new StreamReader(fileStream)) { String processIdString = textReader.ReadToEnd(); node.processId = Convert.ToInt32(processIdString); } 从命令行输入“type”: C:\some-directory> type process.id The process cannot access the file because another process has locked a portion of the file. IE(是的,我很绝望) […]