59 references to PathUtilities
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (59)
MSBuild\ProjectFile\Extensions.cs (1)
40var baseDirectory = PathUtilities.GetDirectoryName(project.FullPath);
MSBuild\ProjectFile\ProjectFile.cs (17)
65var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, filePath); 88var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, filePath); 91var item = items.FirstOrDefault(it => PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath) 92|| PathUtilities.PathsEqual(it.EvaluatedInclude, filePath)); 150var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, filePath); 152item = references.FirstOrDefault(it => PathUtilities.PathsEqual(it.EvaluatedInclude, filePath) 153|| PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath) 154|| PathUtilities.PathsEqual(GetHintPath(it), filePath) 155|| PathUtilities.PathsEqual(GetHintPath(it), relativePath)); 190var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, reference.Path); 216var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, projectFilePath); 221item = references.First(it => PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath) 222|| PathUtilities.PathsEqual(it.EvaluatedInclude, projectFilePath)); 237var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, fullPath); 248var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, fullPath); 251var item = analyzers.FirstOrDefault(it => PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath) 252|| PathUtilities.PathsEqual(it.EvaluatedInclude, fullPath));
MSBuild\ProjectFile\ProjectInstanceReader.cs (14)
45_projectDirectory = PathUtilities.EnsureTrailingSeparator(PathUtilities.GetDirectoryName(_projectFullPath)); 155Includes: [.. g.IncludeGlobs.Select(PathUtilities.ExpandAbsolutePathWithRelativeParts)], 156Excludes: [.. g.Excludes.Select(PathUtilities.ExpandAbsolutePathWithRelativeParts)], 157Removes: [.. g.Removes.Select(PathUtilities.ExpandAbsolutePathWithRelativeParts)]); 221return PathUtilities.GetDirectoryName(linkPath).Split(PathUtilities.DirectorySeparatorChar, PathUtilities.AltDirectorySeparatorChar); 226var relativePath = PathUtilities.GetDirectoryName(PathUtilities.GetRelativePath(_projectDirectory, filePath)); 227var folders = relativePath == null ? [] : relativePath.Split([PathUtilities.DirectorySeparatorChar, PathUtilities.AltDirectorySeparatorChar], StringSplitOptions.RemoveEmptyEntries); 263if (!PathUtilities.IsAbsolute(filePath)) 284return PathUtilities.GetFileName(normalizedPath);
src\roslyn\src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (26)
52Debug.Assert(baseDirectory == null || searchPaths != null || PathUtilities.IsAbsolute(baseDirectory)); 57var kind = PathUtilities.GetPathKind(path); 64combinedPath = PathUtilities.CombinePathsUnchecked(baseDirectory, path); 65Debug.Assert(PathUtilities.IsAbsolute(combinedPath)); 75combinedPath = PathUtilities.CombinePathsUnchecked(searchPath, path); 76Debug.Assert(PathUtilities.IsAbsolute(combinedPath)); 89Debug.Assert(PathUtilities.IsAbsolute(combinedPath)); 106Debug.Assert(baseDirectory == null || PathUtilities.IsAbsolute(baseDirectory)); 107return ResolveRelativePath(PathUtilities.GetPathKind(path), path, basePath, baseDirectory); 112Debug.Assert(PathUtilities.GetPathKind(path) == kind); 127return PathUtilities.CombinePathsUnchecked(baseDirectory, path); 144return PathUtilities.CombinePathsUnchecked(baseDirectory, path); 155return PathUtilities.CombinePathsUnchecked(baseDirectory, path); 161baseRoot = PathUtilities.GetPathRoot(basePath); 165baseRoot = PathUtilities.GetPathRoot(baseDirectory); 177Debug.Assert(PathUtilities.IsDirectorySeparator(path![0])); 178Debug.Assert(path.Length == 1 || !PathUtilities.IsDirectorySeparator(path[1])); 179return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1)); 203Debug.Assert(PathUtilities.IsAbsolute(resolvedBasePath)); 253Debug.Assert(PathUtilities.IsAbsolute(path)); 280if (!PathUtilities.IsAbsolute(path)) 297Debug.Assert(PathUtilities.IsAbsolute(fullPath)); 315Debug.Assert(PathUtilities.IsAbsolute(fullPath)); 399Debug.Assert(PathUtilities.IsAbsolute(fullPath)); 417Debug.Assert(PathUtilities.IsAbsolute(fullPath)); 440Debug.Assert(PathUtilities.IsAbsolute(fullPath));
src\roslyn\src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
944=> PathUtilities.GetDirectoryName(path, isUnixLike);