19 writes to File
Microsoft.Build.Tasks.UnitTests (19)
ReadLinesFromFile_Tests.cs (4)
34File = new TaskItem(file), 81File = new TaskItem(file), 126File = new TaskItem(file), 178File = new TaskItem(file),
WriteLinesToFile_Tests.cs (15)
37File = new TaskItem("c:\\" + Guid.NewGuid().ToString()), 59File = new TaskItem(file), 78File = new TaskItem(file), 110File = new TaskItem(file), 131File = new TaskItem(file), 143File = new TaskItem(file), 169File = new TaskItem(file), 193File = new TaskItem(file), 214File = new TaskItem(file), 227File = new TaskItem(file), 272File = new TaskItem(fileExists), 283File = new TaskItem(fileNotExists), 306File = new TaskItem(file), 337File = new TaskItem(file.Path), 363File = new TaskItem(file.Path),
15 references to File
Microsoft.Build.Tasks.Core (14)
FileIO\WriteLinesToFile.cs (14)
70if (File != null) 99var directoryPath = Path.GetDirectoryName(FileUtilities.NormalizePath(File.ItemSpec)); 111if (FileUtilities.FileExistsNoThrow(File.ItemSpec)) 113string existingContents = System.IO.File.ReadAllText(File.ItemSpec); 118Log.LogMessageFromResources(MessageImportance.Low, "WriteLinesToFile.SkippingUnchangedFile", File.ItemSpec); 119MSBuildEventSource.Log.WriteLinesToFileUpToDateStop(File.ItemSpec, true); 124Log.LogErrorWithCodeFromResources("WriteLinesToFile.ErrorReadingFile", File.ItemSpec); 132Log.LogMessageFromResources(MessageImportance.Low, "WriteLinesToFile.ErrorReadingFile", File.ItemSpec); 134MSBuildEventSource.Log.WriteLinesToFileUpToDateStop(File.ItemSpec, false); 137System.IO.File.WriteAllText(File.ItemSpec, contentsAsString, encoding); 143Log.LogMessageFromResources(MessageImportance.Normal, "WriteLinesToFile.UnusedWriteOnlyWhenDifferent", File.ItemSpec); 147System.IO.File.AppendAllText(File.ItemSpec, buffer.ToString(), encoding); 152string lockedFileMessage = LockCheck.GetLockedFileMessage(File.ItemSpec); 153Log.LogErrorWithCodeFromResources("WriteLinesToFile.ErrorOrWarning", File.ItemSpec, e.Message, lockedFileMessage);
Microsoft.Build.Tasks.UnitTests (1)
WriteLinesToFile_Tests.cs (1)
43Assert.False(File.Exists(a.File.ItemSpec));