C# 클래스 Microsoft.DocAsCode.Utility.PathUtility

파일 보기 프로젝트 열기: dotnet/docfx

공개 메소드들

메소드 설명
CopyFile ( string path, string targetPath, bool overwrite = false ) : void
CopyFilesToFolder ( this files, string sourceFolder, string destinationFolder, bool overwrite, Action messageHandler, bool>.Func errorHandler ) : IEnumerable
FormatPath ( this path, UriKind kind, string basePath = null ) : string

Also change backslash to forward slash

GetFileListFromFile ( string filePath ) : List
GetFullPath ( string folder, string href ) : string
IsPathUnderSpecificFolder ( string path, string folder ) : bool
IsRelativePath ( string path ) : bool
IsVaildFilePath ( string path ) : bool

http://stackoverflow.com/questions/422090/in-c-sharp-check-that-filename-is-possibly-valid-not-that-it-exists

MakeRelativePath ( string basePath, string absolutePath ) : string

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

NormalizePath ( string path ) : string
SaveFileListToFile ( List fileList, string filePath ) : void
ToValidFilePath ( this input ) : string

메소드 상세

CopyFile() 공개 정적인 메소드

public static CopyFile ( string path, string targetPath, bool overwrite = false ) : void
path string
targetPath string
overwrite bool
리턴 void

CopyFilesToFolder() 공개 정적인 메소드

public static CopyFilesToFolder ( this files, string sourceFolder, string destinationFolder, bool overwrite, Action messageHandler, bool>.Func errorHandler ) : IEnumerable
files this
sourceFolder string
destinationFolder string
overwrite bool
messageHandler Action
errorHandler bool>.Func
리턴 IEnumerable

FormatPath() 공개 정적인 메소드

Also change backslash to forward slash
public static FormatPath ( this path, UriKind kind, string basePath = null ) : string
path this
kind UriKind
basePath string
리턴 string

GetFileListFromFile() 공개 정적인 메소드

public static GetFileListFromFile ( string filePath ) : List
filePath string
리턴 List

GetFullPath() 공개 정적인 메소드

public static GetFullPath ( string folder, string href ) : string
folder string
href string
리턴 string

IsPathUnderSpecificFolder() 공개 정적인 메소드

public static IsPathUnderSpecificFolder ( string path, string folder ) : bool
path string
folder string
리턴 bool

IsRelativePath() 공개 정적인 메소드

public static IsRelativePath ( string path ) : bool
path string
리턴 bool

IsVaildFilePath() 공개 정적인 메소드

http://stackoverflow.com/questions/422090/in-c-sharp-check-that-filename-is-possibly-valid-not-that-it-exists
public static IsVaildFilePath ( string path ) : bool
path string
리턴 bool

MakeRelativePath() 공개 정적인 메소드

Creates a relative path from one file or folder to another.
public static MakeRelativePath ( string basePath, string absolutePath ) : string
basePath string Contains the directory that defines the start of the relative path.
absolutePath string Contains the path that defines the endpoint of the relative path.
리턴 string

NormalizePath() 공개 정적인 메소드

public static NormalizePath ( string path ) : string
path string
리턴 string

SaveFileListToFile() 공개 정적인 메소드

public static SaveFileListToFile ( List fileList, string filePath ) : void
fileList List
filePath string
리턴 void

ToValidFilePath() 공개 정적인 메소드

public static ToValidFilePath ( this input ) : string
input this
리턴 string