C# Class NuGet.PathUtility

Datei anzeigen Open project: xero-github/Nuget Class Usage Examples

Public Methods

Method Description
EnsureTrailingSlash ( string path ) : string
GetAbsolutePath ( string basePath, string relativePath ) : string
GetCanonicalPath ( string path ) : string
GetRelativePath ( string path1, string path2 ) : string

Returns path2 relative to path1

IsSubdirectory ( string basePath, string path ) : bool

Method Details

EnsureTrailingSlash() public static method

public static EnsureTrailingSlash ( string path ) : string
path string
return string

GetAbsolutePath() public static method

public static GetAbsolutePath ( string basePath, string relativePath ) : string
basePath string
relativePath string
return string

GetCanonicalPath() public static method

public static GetCanonicalPath ( string path ) : string
path string
return string

GetRelativePath() public static method

Returns path2 relative to path1
public static GetRelativePath ( string path1, string path2 ) : string
path1 string
path2 string
return string

IsSubdirectory() public static method

public static IsSubdirectory ( string basePath, string path ) : bool
basePath string
path string
return bool