C# Класс NUnit.ProjectEditor.PathUtils

Static methods for manipulating project paths, including both directories and files. Some synonyms for System.Path methods are included as well.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
SEPARATORS char[]

Защищенные свойства (Protected)

Свойство Тип Описание
PreferredDirectorySeparatorChar char

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

Метод Описание
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.

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

Метод Описание
PathUtils ( ) : System
PathsEqual ( string path1, string path2 ) : bool
SplitPath ( string path ) : string[]

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

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

Return the canonical form of a path, using '/' as the directory separator
public static Canonicalize ( string path ) : string
path string
Результат string

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

public static IsAssemblyFileType ( string path ) : bool
path string
Результат bool

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

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
Результат string

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

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
Результат bool

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

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
Результат bool

Описание свойств

PreferredDirectorySeparatorChar защищенное статическое свойство

protected static char PreferredDirectorySeparatorChar
Результат char

SEPARATORS публичное статическое свойство

public static char[] SEPARATORS
Результат char[]