75 references to PathUtilities
Microsoft.CodeAnalysis.Workspaces (75)
Diagnostics\DiagnosticDataLocation.cs (2)
87var combined = PathUtilities.CombinePaths(PathUtilities.GetDirectoryName(original), mapped);
Diagnostics\DocumentAnalysisScope.cs (1)
59return TextDocument.Project.AnalyzerOptions.AdditionalFiles.First(a => PathUtilities.Comparer.Equals(a.Path, filePath));
Serialization\SerializationExtensions.cs (6)
49if (!PathUtilities.IsAbsolute(filePath)) 56return new XmlFileResolver(PathUtilities.GetDirectoryName(filePath)); 74if (PathUtilities.IsAbsolute(info.FilePath)) 77builder.Add(PathUtilities.GetDirectoryName(info.FilePath)!); 80if (PathUtilities.IsAbsolute(info.OutputFilePath)) 83builder.Add(PathUtilities.GetDirectoryName(info.OutputFilePath)!);
src\Compilers\Core\Portable\AssemblyUtilitiesCore.cs (1)
29RoslynDebug.Assert(PathUtilities.IsAbsolute(filePath));
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.cs (2)
138string simpleName = PathUtilities.GetFileName(fullPath, includeExtension: false); 144paths = ImmutableHashSet.Create(PathUtilities.Comparer, fullPath);
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);
src\Compilers\Core\Portable\FileSystem\RelativePathResolver.cs (3)
29Debug.Assert(searchPaths.All(PathUtilities.IsAbsolute)); 30Debug.Assert(baseDirectory == null || PathUtilities.GetPathKind(baseDirectory) == PathKind.Absolute); 50Debug.Assert(PathUtilities.IsAbsolute(fullPath));
src\Compilers\Core\Portable\SourceGeneration\GeneratedCodeUtilities.cs (3)
65var fileName = PathUtilities.GetFileName(filePath); 71var extension = PathUtilities.GetExtension(fileName); 74var fileNameWithoutExtension = PathUtilities.GetFileName(filePath, includeExtension: false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EditorConfig\Parsing\Sections\Section.cs (1)
159var relativePath = PathUtilities.GetRelativePath(directoryContainingEditorconfig, codeFilePath);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CompilerUtilities\CompilerPathUtilities.cs (1)
19if (!PathUtilities.IsAbsolute(path))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (7)
58var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath); 59if (!PathUtilities.IsAbsolute(diagnosticFilePath)) 74var analyzerConfigDirectory = PathUtilities.GetDirectoryName(analyzerConfigDocument.FilePath)!; 92if (!PathUtilities.IsAbsolute(solutionOrProjectFilePath)) 97var solutionOrProjectDirectoryPath = PathUtilities.GetDirectoryName(solutionOrProjectFilePath); 99return PathUtilities.CombineAbsoluteAndRelativePaths(solutionOrProjectDirectoryPath!, ".editorconfig"); 105Debug.Assert(PathUtilities.IsAbsolute(analyzerConfigPath));
Storage\SQLite\v2\SQLitePersistentStorage.cs (1)
102_solutionDirectory = PathUtilities.GetDirectoryName(solutionKey.FilePath);
Storage\SQLite\v2\SQLitePersistentStorage_DocumentIds.cs (2)
34documentKey.FilePath != null && PathUtilities.GetDirectoryName(PathUtilities.GetRelativePath(_solutionDirectory, documentKey.FilePath)) is { Length: > 0 } directoryName
Storage\SQLite\v2\SQLitePersistentStorage_ProjectIds.cs (1)
34projectKey.FilePath != null && PathUtilities.GetRelativePath(_solutionDirectory, projectKey.FilePath) is { Length: > 0 } relativePath
Utilities\Documentation\XmlDocumentationProvider.cs (1)
155Debug.Assert(PathUtilities.IsAbsolute(filePath));
Workspace\CommandLineProject.cs (2)
155var relativePath = PathUtilities.GetRelativePath(projectDirectory, absolutePath); 156var isWithinProject = PathUtilities.IsChildPath(projectDirectory, absolutePath);
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
1187assemblyName => PathUtilities.DirectorySeparatorStr + assemblyName + ".dll");
Workspace\Solution\CompilationOutputInfo.cs (3)
41if (path != null && !PathUtilities.IsAbsolute(path)) 56=> PathUtilities.IsAbsolute(GeneratedFilesOutputDirectory ?? AssemblyPath); 62=> HasEffectiveGeneratedFilesOutputDirectory ? GeneratedFilesOutputDirectory ?? PathUtilities.GetDirectoryName(AssemblyPath) : null;
Workspace\Solution\FileTextLoader.cs (1)
248m["Ext"] = PathUtilities.GetExtension(path);
Workspace\Solution\ProjectState.cs (9)
368if (!PathUtilities.IsAbsolute(ProjectInfo.FilePath)) 379var projectDirectory = PathUtilities.GetDirectoryName(ProjectInfo.FilePath); 382var sourceFilePath = PathUtilities.CombinePathsUnchecked(projectDirectory, "\0" + extension); 444var projectPath = PathUtilities.GetDirectoryName(projectFilePath); 447PathUtilities.GetDirectoryName(projectFilePath) is string directory) 449return PathUtilities.CombinePathsUnchecked(directory, documentState.Name); 523var projectPath = PathUtilities.GetDirectoryName(projectFilePath); 526PathUtilities.GetDirectoryName(projectFilePath) is string directory) 528return PathUtilities.CombinePathsUnchecked(directory, documentState.Name);