C# 클래스 KeePassLib.Utility.UrlUtil

A class containing various static path utility helper methods (like stripping extension from a file, etc.).
파일 보기 프로젝트 열기: cappert/keepass2

공개 메소드들

메소드 설명
AssemblyEquals ( string strExt, string strShort ) : bool
ConvertSeparators ( string strPath ) : string
ConvertSeparators ( string strPath, char chSeparator ) : string
EnsureTerminatingSeparator ( string strPath, bool bUrl ) : string

Ensure that a path is terminated with a directory separator character.

FileUrlToPath ( string strUrl ) : string
FilterFileName ( string strName ) : string
GetExtension ( string strPath ) : string

Get the extension of a file.

GetFileDirectory ( string strFile, bool bAppendTerminatingChar, bool bEnsureValidDirSpec ) : string

Get the directory (path) of a file name. The returned string may be terminated by a directory separator character. Example: passing C:\\My Documents\\My File.kdb in strFile and true to bAppendTerminatingChar would produce this string: C:\\My Documents\\.

GetFileInfos ( DirectoryInfo di, string strPattern, SearchOption opt ) : List
GetFileName ( string strPath ) : string

Gets the file name of the specified file (full path). Example: if strPath is C:\\My Documents\\My File.kdb the returned string is My File.kdb.

GetFilePaths ( string strDir, string strPattern, SearchOption opt ) : List
GetHost ( string strUrl ) : string

Get the host component of an URL. This method is faster and more fault-tolerant than creating an Uri object and querying its Host property.

GetQuotedAppPath ( string strPath ) : string

Test if a specified path is accessible, either in read or write mode.

GetShortestAbsolutePath ( string strPath ) : string
GetTempPath ( ) : string
GetUrlLength ( string strText, int nOffset ) : int
HideFile ( string strFile, bool bHide ) : bool
IsAbsolutePath ( string strPath ) : bool
IsUncPath ( string strPath ) : bool
MakeAbsolutePath ( string strBaseFile, string strTargetFile ) : string
MakeRelativePath ( string strBaseFile, string strTargetFile ) : string
RemoveScheme ( string strUrl ) : string
StripExtension ( string strPath ) : string

Strip the extension of a file.

UnhideFile ( string strFile ) : bool

메소드 상세

AssemblyEquals() 공개 정적인 메소드

public static AssemblyEquals ( string strExt, string strShort ) : bool
strExt string
strShort string
리턴 bool

ConvertSeparators() 공개 정적인 메소드

public static ConvertSeparators ( string strPath ) : string
strPath string
리턴 string

ConvertSeparators() 공개 정적인 메소드

public static ConvertSeparators ( string strPath, char chSeparator ) : string
strPath string
chSeparator char
리턴 string

EnsureTerminatingSeparator() 공개 정적인 메소드

Ensure that a path is terminated with a directory separator character.
public static EnsureTerminatingSeparator ( string strPath, bool bUrl ) : string
strPath string Input path.
bUrl bool If true, a slash (/) is appended to /// the string if it's not terminated already. If false, the /// default system directory separator character is used.
리턴 string

FileUrlToPath() 공개 정적인 메소드

public static FileUrlToPath ( string strUrl ) : string
strUrl string
리턴 string

FilterFileName() 공개 정적인 메소드

public static FilterFileName ( string strName ) : string
strName string
리턴 string

GetExtension() 공개 정적인 메소드

Get the extension of a file.
public static GetExtension ( string strPath ) : string
strPath string Full path of a file with extension.
리턴 string

GetFileDirectory() 공개 정적인 메소드

Get the directory (path) of a file name. The returned string may be terminated by a directory separator character. Example: passing C:\\My Documents\\My File.kdb in strFile and true to bAppendTerminatingChar would produce this string: C:\\My Documents\\.
public static GetFileDirectory ( string strFile, bool bAppendTerminatingChar, bool bEnsureValidDirSpec ) : string
strFile string Full path of a file.
bAppendTerminatingChar bool Append a terminating directory separator /// character to the returned path.
bEnsureValidDirSpec bool If true, the returned path /// is guaranteed to be a valid directory path (for example X:\\ instead /// of X:, overriding ). /// This should only be set to true, if the returned path is directly /// passed to some directory API.
리턴 string

GetFileInfos() 공개 정적인 메소드

public static GetFileInfos ( DirectoryInfo di, string strPattern, SearchOption opt ) : List
di System.IO.DirectoryInfo
strPattern string
opt SearchOption
리턴 List

GetFileName() 공개 정적인 메소드

Gets the file name of the specified file (full path). Example: if strPath is C:\\My Documents\\My File.kdb the returned string is My File.kdb.
public static GetFileName ( string strPath ) : string
strPath string Full path of a file.
리턴 string

GetFilePaths() 공개 정적인 메소드

public static GetFilePaths ( string strDir, string strPattern, SearchOption opt ) : List
strDir string
strPattern string
opt SearchOption
리턴 List

GetHost() 공개 정적인 메소드

Get the host component of an URL. This method is faster and more fault-tolerant than creating an Uri object and querying its Host property.
public static GetHost ( string strUrl ) : string
strUrl string
리턴 string

GetQuotedAppPath() 공개 정적인 메소드

Test if a specified path is accessible, either in read or write mode.
public static GetQuotedAppPath ( string strPath ) : string
strPath string
리턴 string

GetShortestAbsolutePath() 공개 정적인 메소드

public static GetShortestAbsolutePath ( string strPath ) : string
strPath string
리턴 string

GetTempPath() 공개 정적인 메소드

public static GetTempPath ( ) : string
리턴 string

GetUrlLength() 공개 정적인 메소드

public static GetUrlLength ( string strText, int nOffset ) : int
strText string
nOffset int
리턴 int

HideFile() 공개 정적인 메소드

public static HideFile ( string strFile, bool bHide ) : bool
strFile string
bHide bool
리턴 bool

IsAbsolutePath() 공개 정적인 메소드

public static IsAbsolutePath ( string strPath ) : bool
strPath string
리턴 bool

IsUncPath() 공개 정적인 메소드

public static IsUncPath ( string strPath ) : bool
strPath string
리턴 bool

MakeAbsolutePath() 공개 정적인 메소드

public static MakeAbsolutePath ( string strBaseFile, string strTargetFile ) : string
strBaseFile string
strTargetFile string
리턴 string

MakeRelativePath() 공개 정적인 메소드

public static MakeRelativePath ( string strBaseFile, string strTargetFile ) : string
strBaseFile string
strTargetFile string
리턴 string

RemoveScheme() 공개 정적인 메소드

public static RemoveScheme ( string strUrl ) : string
strUrl string
리턴 string

StripExtension() 공개 정적인 메소드

Strip the extension of a file.
public static StripExtension ( string strPath ) : string
strPath string Full path of a file with extension.
리턴 string

UnhideFile() 공개 정적인 메소드

public static UnhideFile ( string strFile ) : bool
strFile string
리턴 bool