C# Class NUnit.ProjectEditor.PathUtils

Static methods for manipulating project paths, including both directories and files. Some synonyms for System.Path methods are included as well.
Afficher le fichier Open project: nunit/nunit-project-editor

Méthodes publiques

Свойство Type Description
SEPARATORS char[]

Protected Properties

Свойство Type Description
PreferredDirectorySeparatorChar char

Méthodes publiques

Méthode Description
Canonicalize ( string path ) : string

Return the canonical form of a path, using '/' as the directory separator

IsAssemblyFileType ( string path ) : bool
RelativePath ( string from, string to ) : string

Returns the relative path from a base directory to another directory or file.

SamePath ( string path1, string path2, bool ignoreCase = false ) : bool

True if the two paths are the same. However, two paths to the same file or directory using different network shares or drive letters are not treated as equal.

SamePathOrUnder ( string path1, string path2, bool ignoreCase = false ) : bool

True if the two paths are the same or if the second is directly or indirectly under the first. Note that paths using different network shares or drive letters are considered unrelated, even if they end up referencing the same subtrees in the file system.

Private Methods

Méthode Description
PathUtils ( ) : System
PathsEqual ( string path1, string path2 ) : bool
SplitPath ( string path ) : string[]

Method Details

Canonicalize() public static méthode

Return the canonical form of a path, using '/' as the directory separator
public static Canonicalize ( string path ) : string
path string
Résultat string

IsAssemblyFileType() public static méthode

public static IsAssemblyFileType ( string path ) : bool
path string
Résultat bool

RelativePath() public static méthode

Returns the relative path from a base directory to another directory or file.
public static RelativePath ( string from, string to ) : string
from string
to string
Résultat string

SamePath() public static méthode

True if the two paths are the same. However, two paths to the same file or directory using different network shares or drive letters are not treated as equal.
public static SamePath ( string path1, string path2, bool ignoreCase = false ) : bool
path1 string
path2 string
ignoreCase bool
Résultat bool

SamePathOrUnder() public static méthode

True if the two paths are the same or if the second is directly or indirectly under the first. Note that paths using different network shares or drive letters are considered unrelated, even if they end up referencing the same subtrees in the file system.
public static SamePathOrUnder ( string path1, string path2, bool ignoreCase = false ) : bool
path1 string
path2 string
ignoreCase bool
Résultat bool

Property Details

PreferredDirectorySeparatorChar protected_oe static_oe property

protected static char PreferredDirectorySeparatorChar
Résultat char

SEPARATORS public_oe static_oe property

public static char[] SEPARATORS
Résultat char[]