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