38 references to PathUtilities
Microsoft.CodeAnalysis.CodeStyle (38)
src\Analyzers\Core\Analyzers\MatchFolderAndNamespace\AbstractMatchFolderAndNamespaceDiagnosticAnalyzer.cs (3)
141
if (!
PathUtilities
.IsChildPath(projectDir, namespaceDeclaration.SyntaxTree.FilePath))
148
var relativeDirectoryPath =
PathUtilities
.GetRelativePath(
150
PathUtilities
.GetDirectoryName(namespaceDeclaration.SyntaxTree.FilePath)!);
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))