C# Класс SonarLint.VisualStudio.Integration.PathHelper

Показать файл Открыть проект

Открытые методы

Метод Описание
CalculateRelativePath ( string fromFullPath, string toFullPath ) : string

Compute the path of toFullPath, relative to fromFullPath.

EscapeFileName ( string unescapedName ) : string

Replace all invalid file path characters with the underscore ("_").

ForceDirectoryEnding ( string str ) : string

Append a Path.DirectorySeparatorChar to the end of the string if one does not already exist.

IsPathRootedUnderRoot ( string path, string rootDirectory ) : bool

Gets whether or not the given path has exists under the given rootDirectory.

ResolveRelativePath ( string relativePath, string resolutionRootFullPath ) : string

Resolve a relative path against the given root path.

Приватные методы

Метод Описание
ToFilePathString ( Uri uri ) : string

Описание методов

CalculateRelativePath() публичный статический Метод

Compute the path of toFullPath, relative to fromFullPath.
public static CalculateRelativePath ( string fromFullPath, string toFullPath ) : string
fromFullPath string Path with which to make relative to
toFullPath string Absolute path
Результат string

EscapeFileName() публичный статический Метод

Replace all invalid file path characters with the underscore ("_").
public static EscapeFileName ( string unescapedName ) : string
unescapedName string
Результат string

ForceDirectoryEnding() публичный статический Метод

Append a Path.DirectorySeparatorChar to the end of the string if one does not already exist.
public static ForceDirectoryEnding ( string str ) : string
str string
Результат string

IsPathRootedUnderRoot() публичный статический Метод

Gets whether or not the given path has exists under the given rootDirectory.
public static IsPathRootedUnderRoot ( string path, string rootDirectory ) : bool
path string
rootDirectory string
Результат bool

ResolveRelativePath() публичный статический Метод

Resolve a relative path against the given root path.
public static ResolveRelativePath ( string relativePath, string resolutionRootFullPath ) : string
relativePath string Relative path to resolve
resolutionRootFullPath string Root full path for the resolution of
Результат string