3 writes to Path
Microsoft.Build.Tasks.Core (3)
71 references to Path
Microsoft.Build.Tasks.Core (58)
Copy.cs (56)
267Log.LogErrorWithCodeFromResources("Copy.DestinationIsDirectory", sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue);
277Log.LogErrorWithCodeFromResources("Copy.SourceIsDirectory", sourceFileState.Path.OriginalValue);
283Log.LogErrorWithCodeFromResources("Copy.SourceFileNotFound", sourceFileState.Path.OriginalValue);
287string destinationFolder = Path.GetDirectoryName(destinationFileState.Path);
288string originalDestinationFolder = Path.GetDirectoryName(destinationFileState.Path.OriginalValue);
315Log.LogError(FileComment, sourceFileState.Path, destinationFileState.Path);
328FileUtilities.DeleteNoThrow(destinationFileState.Path);
345Log.LogMessage(MessageImportance.Normal, RetryingAsSymbolicLink, sourceFileState.Path, destinationFileState.Path, errorMessage);
349Log.LogMessage(MessageImportance.Normal, RetryingAsFileCopy, sourceFileState.Path, destinationFileState.Path, errorMessage);
365Log.LogMessage(MessageImportance.Normal, RetryingAsFileCopy, sourceFileState.Path, destinationFileState.Path, errorMessage);
371Log.LogErrorWithCodeFromResources("Copy.LinkFailed", sourceFileState.Path, destinationFileState.Path);
380Log.LogMessage(MessageImportance.Normal, FileComment, sourceFileState.Path, destinationFileState.Path);
382File.Copy(sourceFileState.Path, destinationFileState.Path, true);
403Log.LogMessage(MessageImportance.Normal, linkComment, sourceFileState.Path, destinationFileState.Path);
405linkCreated = createLink(sourceFileState.Path, destinationFileState.Path, errorMessage);
420Log.LogMessage(MessageImportance.Low, RemovingReadOnlyAttribute, file.Path.OriginalValue);
423File.SetAttributes(file.Path, FileAttributes.Normal);
951sourceFileState.Path.OriginalValue,
952destinationFileState.Path.OriginalValue,
955MSBuildEventSource.Log.CopyUpToDateStop(destinationFileState.Path.OriginalValue, true);
959MSBuildEventSource.Log.CopyUpToDateStop(destinationFileState.Path.OriginalValue, false);
962Log.LogError(FileComment, sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue);
972MSBuildEventSource.Log.CopyUpToDateStop(destinationFileState.Path.OriginalValue, true);
981Log.LogErrorWithCodeFromResources("Copy.Error", sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue, e.Message);
986Log.LogErrorWithCodeFromResources("Copy.Error", sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue, e.Message);
1026LogAlwaysRetryDiagnosticFromResources("Copy.IOException", e.ToString(), sourceFileState.Path.OriginalValue, destinationFileState.Path.OriginalValue, code);
1069Log.LogWarningWithCodeFromResources("Copy.Retrying", sourceFileState.Path.OriginalValue,
1070destinationFileState.Path.OriginalValue, retries, RetryDelayMilliseconds, e.Message,
1071LockCheck.GetLockedFileMessage(destinationFileState.Path));
1082Log.LogErrorWithCodeFromResources("Copy.ExceededRetries", sourceFileState.Path.OriginalValue,
1083destinationFileState.Path.OriginalValue, Retries, LockCheck.GetLockedFileMessage(destinationFileState.Path));
1095Log.LogWarningWithCodeFromResources("Copy.Retrying", sourceFileState.Path.OriginalValue,
1096destinationFileState.Path.OriginalValue, retries, RetryDelayMilliseconds, String.Empty /* no details */,
1097LockCheck.GetLockedFileMessage(destinationFileState.Path));
1106Log.LogErrorWithCodeFromResources("Copy.ExceededRetries", sourceFileState.Path.OriginalValue,
1107destinationFileState.Path.OriginalValue, Retries, LockCheck.GetLockedFileMessage(destinationFileState.Path));
1142source.Path = source.Path.GetCanonicalForm();
1143destination.Path = destination.Path.GetCanonicalForm();
1144return source.Path == destination.Path;
Microsoft.Build.Tasks.UnitTests (13)
Copy_Tests.cs (9)
2065filesActuallyCopied.Select(f => Path.GetFileName(f.Key.Path)).ShouldBe(new[] { "a.cs", "b.cs" }, ignoreOrder: true);
2134var xaCopies = filesActuallyCopied.Where(f => f.Value.Path == xaPath).ToList();
2136Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[0].Key.Path);
2137Assert.Equal(Path.Combine(tempPath, "b.cs"), xaCopies[1].Key.Path);
2138Assert.Equal(Path.Combine(tempPath, "a.cs"), xaCopies[2].Key.Path);
2141var xbCopies = filesActuallyCopied.Where(f => f.Value.Path == xbPath).ToList();
2143Assert.Equal(Path.Combine(tempPath, "a.cs"), xbCopies[0].Key.Path);
2511Assert.Contains(copyFunctor.FilesCopiedSuccessfully, f => f.Path.OriginalValue == FileUtilities.FixFilePath("c:\\source"));
2512Assert.Contains(copyFunctor.FilesCopiedSuccessfully, f => f.Path.OriginalValue == FileUtilities.FixFilePath("c:\\source2"));