C# Class Gammtek.Conduit.IO.ConduitPath

Afficher le fichier Open project: ME3Explorer/ME3Explorer

Méthodes publiques

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

Method Details

CleanDirectorySeparators() public static méthode

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

GetExecutingAssemblyDirectory() public static méthode

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

GetExecutingAssemblyLocation() public static méthode

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

MakePathRelativeTo() public static méthode

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