C# Класс Gammtek.Conduit.IO.ConduitPath

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

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

Метод Описание
CleanDirectorySeparators ( string filePath, char directorySeparatorChar = '\0' ) : string

Takes a path string and makes all of the path separator characters consistent. Also removes unnecessary multiple separators.

GetExecutingAssemblyDirectory ( ) : string

Gets the executing assembly directory. This method is using Assembly.CodeBase property to properly resolve original assembly directory in case shadow copying is enabled.

GetExecutingAssemblyLocation ( ) : string

Gets the executing assembly path (including filename). This method is using Assembly.CodeBase property to properly resolve original assembly path in case shadow copying is enabled.

MakePathRelativeTo ( string sourcePath, string relativeToDirectory, bool treatSourceAsDirectory = false ) : string

Given a file path and a directory, returns a file path that is relative to the specified directory

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

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

Takes a path string and makes all of the path separator characters consistent. Also removes unnecessary multiple separators.
public static CleanDirectorySeparators ( string filePath, char directorySeparatorChar = '\0' ) : string
filePath string File path with potentially inconsistent slashes
directorySeparatorChar char
Результат string

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

Gets the executing assembly directory. This method is using Assembly.CodeBase property to properly resolve original assembly directory in case shadow copying is enabled.
public static GetExecutingAssemblyDirectory ( ) : string
Результат string

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

Gets the executing assembly path (including filename). This method is using Assembly.CodeBase property to properly resolve original assembly path in case shadow copying is enabled.
public static GetExecutingAssemblyLocation ( ) : string
Результат string

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

Given a file path and a directory, returns a file path that is relative to the specified directory
public static MakePathRelativeTo ( string sourcePath, string relativeToDirectory, bool treatSourceAsDirectory = false ) : string
sourcePath string File path to convert
relativeToDirectory string /// The directory that the source file path should be converted to be relative to. If this path is not rooted, it will /// be assumed to be relative to the current working directory. ///
treatSourceAsDirectory bool True if we should treat the source path like a directory even if it doesn't end with a path separator
Результат string