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)
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);
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)
101_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)
156Debug.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)
1151assemblyName => 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);