55 references to PathUtilities
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (55)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
122
var baseDirectory =
PathUtilities
.GetDirectoryName(Project.FullPath);
MSBuild\ProjectFile\ProjectFile.cs (27)
37
_projectDirectory =
PathUtilities
.EnsureTrailingSeparator(directory);
270
return [..
PathUtilities
.GetDirectoryName(linkPath).Split(
PathUtilities
.DirectorySeparatorChar,
PathUtilities
.AltDirectorySeparatorChar)];
275
var relativePath =
PathUtilities
.GetDirectoryName(
PathUtilities
.GetRelativePath(_projectDirectory, filePath));
276
var folders = relativePath == null ? [] : relativePath.Split(
PathUtilities
.DirectorySeparatorChar,
PathUtilities
.AltDirectorySeparatorChar).ToImmutableArray();
333
if (!
PathUtilities
.IsAbsolute(filePath))
354
return
PathUtilities
.GetFileName(normalizedPath);
366
var relativePath =
PathUtilities
.GetRelativePath(_loadedProject.DirectoryPath, filePath);
389
var relativePath =
PathUtilities
.GetRelativePath(_loadedProject.DirectoryPath, filePath);
392
var item = items.FirstOrDefault(it =>
PathUtilities
.PathsEqual(it.EvaluatedInclude, relativePath)
393
||
PathUtilities
.PathsEqual(it.EvaluatedInclude, filePath));
451
var relativePath =
PathUtilities
.GetRelativePath(_loadedProject.DirectoryPath, filePath);
453
item = references.FirstOrDefault(it =>
PathUtilities
.PathsEqual(it.EvaluatedInclude, filePath)
454
||
PathUtilities
.PathsEqual(it.EvaluatedInclude, relativePath)
455
||
PathUtilities
.PathsEqual(GetHintPath(it), filePath)
456
||
PathUtilities
.PathsEqual(GetHintPath(it), relativePath));
491
var relativePath =
PathUtilities
.GetRelativePath(_loadedProject.DirectoryPath, reference.Path);
517
var relativePath =
PathUtilities
.GetRelativePath(_loadedProject.DirectoryPath, projectFilePath);
522
item = references.First(it =>
PathUtilities
.PathsEqual(it.EvaluatedInclude, relativePath)
523
||
PathUtilities
.PathsEqual(it.EvaluatedInclude, projectFilePath));
538
var relativePath =
PathUtilities
.GetRelativePath(_loadedProject.DirectoryPath, fullPath);
549
var relativePath =
PathUtilities
.GetRelativePath(_loadedProject.DirectoryPath, fullPath);
552
var item = analyzers.FirstOrDefault(it =>
PathUtilities
.PathsEqual(it.EvaluatedInclude, relativePath)
553
||
PathUtilities
.PathsEqual(it.EvaluatedInclude, fullPath));
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (26)
48
Debug.Assert(baseDirectory == null || searchPaths != null ||
PathUtilities
.IsAbsolute(baseDirectory));
53
var kind =
PathUtilities
.GetPathKind(path);
60
combinedPath =
PathUtilities
.CombinePathsUnchecked(baseDirectory, path);
61
Debug.Assert(
PathUtilities
.IsAbsolute(combinedPath));
71
combinedPath =
PathUtilities
.CombinePathsUnchecked(searchPath, path);
72
Debug.Assert(
PathUtilities
.IsAbsolute(combinedPath));
85
Debug.Assert(
PathUtilities
.IsAbsolute(combinedPath));
102
Debug.Assert(baseDirectory == null ||
PathUtilities
.IsAbsolute(baseDirectory));
103
return ResolveRelativePath(
PathUtilities
.GetPathKind(path), path, basePath, baseDirectory);
108
Debug.Assert(
PathUtilities
.GetPathKind(path) == kind);
123
return
PathUtilities
.CombinePathsUnchecked(baseDirectory, path);
140
return
PathUtilities
.CombinePathsUnchecked(baseDirectory, path);
151
return
PathUtilities
.CombinePathsUnchecked(baseDirectory, path);
157
baseRoot =
PathUtilities
.GetPathRoot(basePath);
161
baseRoot =
PathUtilities
.GetPathRoot(baseDirectory);
173
Debug.Assert(
PathUtilities
.IsDirectorySeparator(path![0]));
174
Debug.Assert(path.Length == 1 || !
PathUtilities
.IsDirectorySeparator(path[1]));
175
return
PathUtilities
.CombinePathsUnchecked(baseRoot, path.Substring(1));
199
Debug.Assert(
PathUtilities
.IsAbsolute(resolvedBasePath));
249
Debug.Assert(
PathUtilities
.IsAbsolute(path));
276
if (!
PathUtilities
.IsAbsolute(path))
293
Debug.Assert(
PathUtilities
.IsAbsolute(fullPath));
311
Debug.Assert(
PathUtilities
.IsAbsolute(fullPath));
395
Debug.Assert(
PathUtilities
.IsAbsolute(fullPath));
413
Debug.Assert(
PathUtilities
.IsAbsolute(fullPath));
436
Debug.Assert(
PathUtilities
.IsAbsolute(fullPath));
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
904
=>
PathUtilities
.GetDirectoryName(path, isUnixLike);