59 references to PathUtilities
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (59)
MSBuild\ProjectFile\CommandLineArgumentReader.cs (1)
122var baseDirectory = PathUtilities.GetDirectoryName(Project.FullPath);
MSBuild\ProjectFile\ProjectFile.cs (17)
55var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, filePath); 78var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, filePath); 81var item = items.FirstOrDefault(it => PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath) 82|| PathUtilities.PathsEqual(it.EvaluatedInclude, filePath)); 140var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, filePath); 142item = references.FirstOrDefault(it => PathUtilities.PathsEqual(it.EvaluatedInclude, filePath) 143|| PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath) 144|| PathUtilities.PathsEqual(GetHintPath(it), filePath) 145|| PathUtilities.PathsEqual(GetHintPath(it), relativePath)); 180var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, reference.Path); 206var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, projectFilePath); 211item = references.First(it => PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath) 212|| PathUtilities.PathsEqual(it.EvaluatedInclude, projectFilePath)); 227var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, fullPath); 238var relativePath = PathUtilities.GetRelativePath(project.DirectoryPath, fullPath); 241var item = analyzers.FirstOrDefault(it => PathUtilities.PathsEqual(it.EvaluatedInclude, relativePath) 242|| PathUtilities.PathsEqual(it.EvaluatedInclude, fullPath));
MSBuild\ProjectFile\ProjectInstanceReader.cs (14)
31_projectDirectory = PathUtilities.EnsureTrailingSeparator(PathUtilities.GetDirectoryName(_projectInstance.FullPath)); 130Includes: [.. g.IncludeGlobs.Select(PathUtilities.ExpandAbsolutePathWithRelativeParts)], 131Excludes: [.. g.Excludes.Select(PathUtilities.ExpandAbsolutePathWithRelativeParts)], 132Removes: [.. g.Removes.Select(PathUtilities.ExpandAbsolutePathWithRelativeParts)]); 189return [.. PathUtilities.GetDirectoryName(linkPath).Split(PathUtilities.DirectorySeparatorChar, PathUtilities.AltDirectorySeparatorChar)]; 194var relativePath = PathUtilities.GetDirectoryName(PathUtilities.GetRelativePath(_projectDirectory, filePath)); 195var folders = relativePath == null ? [] : relativePath.Split([PathUtilities.DirectorySeparatorChar, PathUtilities.AltDirectorySeparatorChar], StringSplitOptions.RemoveEmptyEntries).ToImmutableArray(); 231if (!PathUtilities.IsAbsolute(filePath)) 252return PathUtilities.GetFileName(normalizedPath);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (26)
49Debug.Assert(baseDirectory == null || searchPaths != null || PathUtilities.IsAbsolute(baseDirectory)); 54var kind = PathUtilities.GetPathKind(path); 61combinedPath = PathUtilities.CombinePathsUnchecked(baseDirectory, path); 62Debug.Assert(PathUtilities.IsAbsolute(combinedPath)); 72combinedPath = PathUtilities.CombinePathsUnchecked(searchPath, path); 73Debug.Assert(PathUtilities.IsAbsolute(combinedPath)); 86Debug.Assert(PathUtilities.IsAbsolute(combinedPath)); 103Debug.Assert(baseDirectory == null || PathUtilities.IsAbsolute(baseDirectory)); 104return ResolveRelativePath(PathUtilities.GetPathKind(path), path, basePath, baseDirectory); 109Debug.Assert(PathUtilities.GetPathKind(path) == kind); 124return PathUtilities.CombinePathsUnchecked(baseDirectory, path); 141return PathUtilities.CombinePathsUnchecked(baseDirectory, path); 152return PathUtilities.CombinePathsUnchecked(baseDirectory, path); 158baseRoot = PathUtilities.GetPathRoot(basePath); 162baseRoot = PathUtilities.GetPathRoot(baseDirectory); 174Debug.Assert(PathUtilities.IsDirectorySeparator(path![0])); 175Debug.Assert(path.Length == 1 || !PathUtilities.IsDirectorySeparator(path[1])); 176return PathUtilities.CombinePathsUnchecked(baseRoot, path.Substring(1)); 200Debug.Assert(PathUtilities.IsAbsolute(resolvedBasePath)); 250Debug.Assert(PathUtilities.IsAbsolute(path)); 277if (!PathUtilities.IsAbsolute(path)) 294Debug.Assert(PathUtilities.IsAbsolute(fullPath)); 312Debug.Assert(PathUtilities.IsAbsolute(fullPath)); 396Debug.Assert(PathUtilities.IsAbsolute(fullPath)); 414Debug.Assert(PathUtilities.IsAbsolute(fullPath)); 437Debug.Assert(PathUtilities.IsAbsolute(fullPath));
src\Compilers\Core\Portable\FileSystem\PathUtilities.cs (1)
904=> PathUtilities.GetDirectoryName(path, isUnixLike);