C# Class SonarLint.VisualStudio.Integration.PathHelper

Afficher le fichier Open project: SonarSource-VisualStudio/sonarlint-visualstudio

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
ToFilePathString ( Uri uri ) : string

Method Details

CalculateRelativePath() public static méthode

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
Résultat string

EscapeFileName() public static méthode

Replace all invalid file path characters with the underscore ("_").
public static EscapeFileName ( string unescapedName ) : string
unescapedName string
Résultat string

ForceDirectoryEnding() public static méthode

Append a Path.DirectorySeparatorChar to the end of the string if one does not already exist.
public static ForceDirectoryEnding ( string str ) : string
str string
Résultat string

IsPathRootedUnderRoot() public static méthode

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
Résultat bool

ResolveRelativePath() public static méthode

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
Résultat string