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