C# 클래스 PathLib.Utils.PathUtils

General utilities and separator-agnostic replacements for System.IO.Path methods.
파일 보기 프로젝트 열기: nemec/pathlib

공개 메소드들

메소드 설명
ChangeExtension ( string path, string extension, string separator ) : string

Changes the extension of a file path.

GetDirectoryName ( string path, string separator ) : string

Returns the directory path of a file path.

GetExtension ( string path, string separator ) : string

Returns the extension of the given path.

GetFileName ( string path, string separator ) : string

Returns the name and extension parts of the given path.

GetFileNameWithoutExtension ( string path, string separator ) : string

Returns the name and of the given path, minus the extension.

GetPathRoot ( string path, string separator ) : string

Returns the root portion of the given path.

IsPathRooted ( string path, string separator ) : bool

Tests if the given path contains a root.

비공개 메소드들

메소드 설명
Combine ( IEnumerable paths, string separator ) : IPurePath
Combine ( string path1, string path2, string separator ) : string
Glob ( string pattern, string haystack, bool fullMatch = false, bool caseInsensitive = false ) : bool
TrySafeCombine ( IPurePath @base, IPurePath toJoin, string separator, string &combined ) : bool

Removes all parent directory components. Disallows combining with absolute paths.

findExtension ( string path, string separator ) : int

메소드 상세

ChangeExtension() 공개 정적인 메소드

Changes the extension of a file path.
public static ChangeExtension ( string path, string extension, string separator ) : string
path string
extension string
separator string
리턴 string

GetDirectoryName() 공개 정적인 메소드

Returns the directory path of a file path.
public static GetDirectoryName ( string path, string separator ) : string
path string
separator string
리턴 string

GetExtension() 공개 정적인 메소드

Returns the extension of the given path.
public static GetExtension ( string path, string separator ) : string
path string
separator string
리턴 string

GetFileName() 공개 정적인 메소드

Returns the name and extension parts of the given path.
public static GetFileName ( string path, string separator ) : string
path string
separator string
리턴 string

GetFileNameWithoutExtension() 공개 정적인 메소드

Returns the name and of the given path, minus the extension.
public static GetFileNameWithoutExtension ( string path, string separator ) : string
path string
separator string
리턴 string

GetPathRoot() 공개 정적인 메소드

Returns the root portion of the given path.
public static GetPathRoot ( string path, string separator ) : string
path string
separator string
리턴 string

IsPathRooted() 공개 정적인 메소드

Tests if the given path contains a root.
public static IsPathRooted ( string path, string separator ) : bool
path string
separator string
리턴 bool