C# Class Microsoft.Common.Core.IOExtensions

显示文件 Open project: Microsoft/RTVS

Public Methods

Method Description
EnsureTrailingSlash ( this path ) : string
ExistsOnPath ( string fileName ) : bool
GetAllFiles ( this basedir ) : IEnumerable

Recursively enumerate sub-directories and gets all files for the given basedir

GetFullPath ( string fileName ) : string
HasReadPermissions ( this path ) : bool
HasWritePermission ( this path ) : bool
MakeRelativePath ( this path, string basePath ) : string
PathEquals ( this path, string otherPath ) : bool
TrimTrailingSlash ( this path ) : string

Private Methods

Method Description
GetTrailingSlashTrimmedPathLength ( string path ) : int

Method Details

EnsureTrailingSlash() public static method

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

ExistsOnPath() public static method

public static ExistsOnPath ( string fileName ) : bool
fileName string
return bool

GetAllFiles() public static method

Recursively enumerate sub-directories and gets all files for the given basedir
public static GetAllFiles ( this basedir ) : IEnumerable
basedir this
return IEnumerable

GetFullPath() public static method

public static GetFullPath ( string fileName ) : string
fileName string
return string

HasReadPermissions() public static method

public static HasReadPermissions ( this path ) : bool
path this
return bool

HasWritePermission() public static method

public static HasWritePermission ( this path ) : bool
path this
return bool

MakeRelativePath() public static method

public static MakeRelativePath ( this path, string basePath ) : string
path this
basePath string
return string

PathEquals() public static method

public static PathEquals ( this path, string otherPath ) : bool
path this
otherPath string
return bool

TrimTrailingSlash() public static method

public static TrimTrailingSlash ( this path ) : string
path this
return string