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