3 writes to Path
Microsoft.Build.Tasks.Core (3)
Copy.cs (2)
1151source.Path = source.Path.GetCanonicalForm(); 1152destination.Path = destination.Path.GetCanonicalForm();
FileState.cs (1)
252Path = path;
71 references to Path
Microsoft.Build.Tasks.Core (58)
Copy.cs (56)
264Log.LogErrorWithCodeFromResources("Copy.DestinationIsDirectory", sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue); 274Log.LogErrorWithCodeFromResources("Copy.SourceIsDirectory", sourceFileState.Path.OriginalValue); 280Log.LogErrorWithCodeFromResources("Copy.SourceFileNotFound", sourceFileState.Path.OriginalValue); 284string destinationFolder = Path.GetDirectoryName(destinationFileState.Path); 285string originalDestinationFolder = Path.GetDirectoryName(destinationFileState.Path.OriginalValue); 312Log.LogError(FileComment, sourceFileState.Path, destinationFileState.Path); 325FileUtilities.DeleteNoThrow(destinationFileState.Path); 342Log.LogMessage(MessageImportance.Normal, RetryingAsSymbolicLink, sourceFileState.Path, destinationFileState.Path, errorMessage); 346Log.LogMessage(MessageImportance.Normal, RetryingAsFileCopy, sourceFileState.Path, destinationFileState.Path, errorMessage); 362Log.LogMessage(MessageImportance.Normal, RetryingAsFileCopy, sourceFileState.Path, destinationFileState.Path, errorMessage); 368Log.LogErrorWithCodeFromResources("Copy.LinkFailed", sourceFileState.Path, destinationFileState.Path); 377Log.LogMessage(MessageImportance.Normal, FileComment, sourceFileState.Path, destinationFileState.Path); 379File.Copy(sourceFileState.Path, destinationFileState.Path, true); 400Log.LogMessage(MessageImportance.Normal, linkComment, sourceFileState.Path, destinationFileState.Path); 402linkCreated = createLink(sourceFileState.Path, destinationFileState.Path, errorMessage); 417Log.LogMessage(MessageImportance.Low, RemovingReadOnlyAttribute, file.Path.OriginalValue); 420File.SetAttributes(file.Path, FileAttributes.Normal); 957sourceFileState.Path.OriginalValue, 958destinationFileState.Path.OriginalValue, 961MSBuildEventSource.Log.CopyUpToDateStop(destinationFileState.Path.OriginalValue, true); 965MSBuildEventSource.Log.CopyUpToDateStop(destinationFileState.Path.OriginalValue, false); 968Log.LogError(FileComment, sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue); 978MSBuildEventSource.Log.CopyUpToDateStop(destinationFileState.Path.OriginalValue, true); 987Log.LogErrorWithCodeFromResources("Copy.Error", sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue, e.Message); 992Log.LogErrorWithCodeFromResources("Copy.Error", sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue, e.Message); 1032LogAlwaysRetryDiagnosticFromResources("Copy.IOException", e.ToString(), sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue, code); 1078Log.LogWarningWithCodeFromResources("Copy.Retrying", sourceFileState.Path.OriginalValue, 1079destinationFileState.Path.OriginalValue, retries, RetryDelayMilliseconds, e.Message, 1080LockCheck.GetLockedFileMessage(destinationFileState.Path)); 1091Log.LogErrorWithCodeFromResources("Copy.ExceededRetries", sourceFileState.Path.OriginalValue, 1092destinationFileState.Path.OriginalValue, Retries, LockCheck.GetLockedFileMessage(destinationFileState.Path)); 1104Log.LogWarningWithCodeFromResources("Copy.Retrying", sourceFileState.Path.OriginalValue, 1105destinationFileState.Path.OriginalValue, retries, RetryDelayMilliseconds, String.Empty /* no details */, 1106LockCheck.GetLockedFileMessage(destinationFileState.Path)); 1115Log.LogErrorWithCodeFromResources("Copy.ExceededRetries", sourceFileState.Path.OriginalValue, 1116destinationFileState.Path.OriginalValue, Retries, LockCheck.GetLockedFileMessage(destinationFileState.Path)); 1151source.Path = source.Path.GetCanonicalForm(); 1152destination.Path = destination.Path.GetCanonicalForm(); 1153return source.Path == destination.Path;
FileState.cs (2)
253_data = new Lazy<FileDirInfo>(() => new FileDirInfo(Path)); 345_data = new Lazy<FileDirInfo>(() => new FileDirInfo(Path));
Microsoft.Build.Tasks.UnitTests (13)
Copy_Tests.cs (9)
2123filesActuallyCopied.Select(f => Path.GetFileName(f.Key.Path)).ShouldBe(new[] { "a.cs", "b.cs" }, ignoreOrder: true); 2192var xaCopies = filesActuallyCopied.Where(f => f.Value.Path == xaPath).ToList(); 2194Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[0].Key.Path); 2195Assert.Equal(Path.Combine(tempPath, "b.cs"), xaCopies[1].Key.Path); 2196Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[2].Key.Path); 2199var xbCopies = filesActuallyCopied.Where(f => f.Value.Path == xbPath).ToList(); 2201Assert.Equal(Path.Combine(tempPath, "a.cs"), xbCopies[0].Key.Path); 2569Assert.Contains(copyFunctor.FilesCopiedSuccessfully, f => f.Path.OriginalValue == FileUtilities.FixFilePath("c:\\source")); 2570Assert.Contains(copyFunctor.FilesCopiedSuccessfully, f => f.Path.OriginalValue == FileUtilities.FixFilePath("c:\\source2"));
FileStateTests.cs (4)
90Assert.Equal(info.FullName, state.Path); 219Assert.Equal(info.FullName, state.Path); 224Assert.Equal(originalName, state.Path); 226Assert.Equal(originalName, state.Path); // Name is from the constructor, didn't change