39 references to PathUtils
Microsoft.Build.Tasks.Git (39)
GitDataReader\GitConfig.Reader.cs (8)
68
_gitDirectoryPosix =
PathUtils
.ToPosixDirectoryPath(gitDirectory);
176
if (!
PathUtils
.IsUnixLikePlatform)
276
if (relativePath.Length >= 2 && relativePath[0] == '~' &&
PathUtils
.IsDirectorySeparator(relativePath[1]))
334
pattern =
PathUtils
.CombinePosixPaths(
PathUtils
.ToPosixPath(Path.GetDirectoryName(configFilePath)!), pattern[2..]);
339
pattern =
PathUtils
.CombinePosixPaths(
PathUtils
.ToPosixPath(_environment.GetHomeDirectoryForPathExpansion(pattern)), pattern[2..]);
341
else if (!
PathUtils
.IsAbsolute(pattern))
GitDataReader\GitEnvironment.cs (4)
113
if (
PathUtils
.IsUnixLikePlatform)
129
Debug.Assert(!
PathUtils
.IsUnixLikePlatform);
138
var gitExe = paths.FirstOrDefault(dir => !string.IsNullOrWhiteSpace(dir) && File.Exists(
PathUtils
.CombinePaths(dir, "git.exe")));
144
var gitCmd = paths.FirstOrDefault(dir => !string.IsNullOrWhiteSpace(dir) && File.Exists(
PathUtils
.CombinePaths(dir, "git.cmd")));
GitDataReader\GitIgnore.cs (6)
31
NullableDebug.Assert(
PathUtils
.IsPosixPath(containingDirectory));
32
NullableDebug.Assert(
PathUtils
.HasTrailingSlash(containingDirectory));
82
NullableDebug.Assert(
PathUtils
.IsAbsolute(workingDirectory));
85
WorkingDirectory =
PathUtils
.ToPosixDirectoryPath(workingDirectory);
86
_workingDirectoryNoSlash =
PathUtils
.TrimTrailingSlash(WorkingDirectory);
122
var directory =
PathUtils
.ToPosixDirectoryPath(Path.GetFullPath(Path.GetDirectoryName(path)!));
GitDataReader\GitIgnore.Matcher.cs (13)
44
Debug.Assert(
PathUtils
.HasTrailingSlash(directory));
75
if (!
PathUtils
.IsAbsolute(fullPath))
80
if (
PathUtils
.HasTrailingDirectorySeparator(fullPath))
85
return IsPathIgnored(
PathUtils
.ToPosixPath(fullPath), isDirectoryPath: false);
95
if (!
PathUtils
.IsAbsolute(fullPath))
101
var isDirectoryPath =
PathUtils
.HasTrailingDirectorySeparator(fullPath) || Directory.Exists(fullPath);
103
var fullPathNoSlash =
PathUtils
.TrimTrailingSlash(
PathUtils
.ToPosixPath(Path.GetFullPath(fullPath)));
114
Debug.Assert(
PathUtils
.IsAbsolute(normalizedPosixPath));
115
Debug.Assert(
PathUtils
.IsPosixPath(normalizedPosixPath));
116
Debug.Assert(!
PathUtils
.HasTrailingSlash(normalizedPosixPath));
153
normalizedPosixPath =
PathUtils
.TrimTrailingSlash(directory);
166
Debug.Assert(!
PathUtils
.HasTrailingSlash(fullPath));
GitDataReader\GitReferenceResolver.cs (2)
38
Debug.Assert(
PathUtils
.IsNormalized(gitDirectory));
39
Debug.Assert(
PathUtils
.IsNormalized(commonDirectory));
GitDataReader\GitRepository.cs (3)
54
NullableDebug.Assert(
PathUtils
.IsNormalized(gitDirectory));
55
NullableDebug.Assert(
PathUtils
.IsNormalized(commonDirectory));
56
NullableDebug.Assert(workingDirectory == null ||
PathUtils
.IsNormalized(workingDirectory));
GitDataReader\GitRepositoryLocation.cs (3)
28
NullableDebug.Assert(
PathUtils
.IsNormalized(gitDirectory));
29
NullableDebug.Assert(
PathUtils
.IsNormalized(commonDirectory));
30
NullableDebug.Assert(workingDirectory == null ||
PathUtils
.IsNormalized(workingDirectory));