C# Class Patchwork.Engine.Utility.PathHelper

Utility methods for dealing with paths.
ファイルを表示 Open project: GregRos/Patchwork

Public Methods

Method Description
ChangeExtension ( string path, string>.Func selector ) : string
Components ( string path ) : IEnumerable
Equal ( string path1, string path2 ) : bool
GetAbsolutePath ( string relativePath ) : string
GetAbsolutePath ( string relativeTo, string relativePath ) : string
GetAbsolutePathFromAssembly ( string relPath ) : string
GetRelativePath ( String fromPath, String toPath ) : String

Creates a relative path from one file or folder to another.

GetRelativePath ( string path ) : string
GetUserFriendlyPath ( string path ) : string

Method Details

ChangeExtension() public static method

public static ChangeExtension ( string path, string>.Func selector ) : string
path string
selector string>.Func
return string

Components() public static method

public static Components ( string path ) : IEnumerable
path string
return IEnumerable

Equal() public static method

public static Equal ( string path1, string path2 ) : bool
path1 string
path2 string
return bool

GetAbsolutePath() public static method

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

GetAbsolutePath() public static method

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

GetAbsolutePathFromAssembly() public static method

public static GetAbsolutePathFromAssembly ( string relPath ) : string
relPath string
return string

GetRelativePath() public static method

Creates a relative path from one file or folder to another.
public static GetRelativePath ( String fromPath, String toPath ) : String
fromPath String Contains the directory that defines the start of the relative path.
toPath String Contains the path that defines the endpoint of the relative path.
return String

GetRelativePath() public static method

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

GetUserFriendlyPath() public static method

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