C# Класс DroidExplorer.Core.IO.Path

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
AltDirectorySeparatorChar char
DirectorySeparatorChar char
PathSeparator char

Открытые методы

Метод Описание
ChangeExtension ( string path, string extension ) : string

Changes the extension of a path string.

Combine ( string path1, string path2 ) : string

Combines two path strings.

GetDirectoryName ( string path ) : string

Returns the directory information for the specified path string.

GetExtension ( string path ) : string

Returns the extension of the specified path string.

GetFileName ( string path ) : string

Returns the file name and extension of the specified path string.

GetFileNameWithoutExtension ( string path ) : string

Returns the file name of the specified path string without the extension.

GetInvalidFileNameChars ( ) : char[]

Gets an array containing the characters that are not allowed in file names.

GetInvalidPathChars ( ) : char[]

Gets an array containing the characters that are not allowed in path names.

GetPathRoot ( string path ) : string

Gets the root directory information of the specified path.

GetPathWithoutFile ( string path ) : string
HasExtension ( string path ) : bool

Determines whether a path includes a file name extension.

IsPathRooted ( string path ) : bool

Gets a value indicating whether the specified path string contains absolute or relative path information.

Приватные методы

Метод Описание
CanPathCircumventSecurityNative ( string partOfPath ) : bool
CharArrayStartsWithOrdinal ( char array, int numChars, string compareTo, bool ignoreCase ) : bool
CheckInvalidPathChars ( string path ) : void
FixupPath ( string path ) : string
GetRootLength ( string path ) : int
InternalCombine ( string path1, string path2 ) : string
IsDirectorySeparator ( char c ) : bool

Описание методов

ChangeExtension() публичный статический Метод

Changes the extension of a path string.
The path contains one or more of the invalid characters defined in , or contains a wildcard character.
public static ChangeExtension ( string path, string extension ) : string
path string The path information to modify. The path cannot contain any of the characters defined in .
extension string The new extension (with a leading period). Specify null to remove an existing extension from path.
Результат string

Combine() публичный статический Метод

Combines two path strings.
path1 or path2 is null. path1 or path2 contain one or more of the invalid characters defined in , or contains a wildcard character.
public static Combine ( string path1, string path2 ) : string
path1 string The first path.
path2 string The second path.
Результат string

GetDirectoryName() публичный статический Метод

Returns the directory information for the specified path string.
The path parameter contains invalid characters, is empty, or contains only white spaces, or contains a wildcard character. The path parameter is longer than the system-defined maximum length.
public static GetDirectoryName ( string path ) : string
path string The path of a file or directory.
Результат string

GetExtension() публичный статический Метод

Returns the extension of the specified path string.
path contains one or more of the invalid characters defined in , or contains a wildcard character.
public static GetExtension ( string path ) : string
path string The path string from which to get the extension.
Результат string

GetFileName() публичный статический Метод

Returns the file name and extension of the specified path string.
path contains one or more of the invalid characters defined in , or contains a wildcard character.
public static GetFileName ( string path ) : string
path string The path string from which to obtain the file name and extension.
Результат string

GetFileNameWithoutExtension() публичный статический Метод

Returns the file name of the specified path string without the extension.
path contains one or more of the invalid characters defined in , or contains a wildcard character.
public static GetFileNameWithoutExtension ( string path ) : string
path string The path of the file.
Результат string

GetInvalidFileNameChars() публичный статический Метод

Gets an array containing the characters that are not allowed in file names.
public static GetInvalidFileNameChars ( ) : char[]
Результат char[]

GetInvalidPathChars() публичный статический Метод

Gets an array containing the characters that are not allowed in path names.
public static GetInvalidPathChars ( ) : char[]
Результат char[]

GetPathRoot() публичный статический Метод

Gets the root directory information of the specified path.
path contains one or more of the invalid characters defined in , or contains a wildcard character.-or- was passed to path.
public static GetPathRoot ( string path ) : string
path string The path from which to obtain root directory information.
Результат string

GetPathWithoutFile() публичный статический Метод

public static GetPathWithoutFile ( string path ) : string
path string
Результат string

HasExtension() публичный статический Метод

Determines whether a path includes a file name extension.
path contains one or more of the invalid characters defined in , or contains a wildcard character.
public static HasExtension ( string path ) : bool
path string The path to search for an extension.
Результат bool

IsPathRooted() публичный статический Метод

Gets a value indicating whether the specified path string contains absolute or relative path information.
path contains one or more of the invalid characters defined in , or contains a wildcard character.
public static IsPathRooted ( string path ) : bool
path string The path to test.
Результат bool

Описание свойств

AltDirectorySeparatorChar публичное статическое свойство

public static char AltDirectorySeparatorChar
Результат char

DirectorySeparatorChar публичное статическое свойство

public static char DirectorySeparatorChar
Результат char

PathSeparator публичное статическое свойство

public static char PathSeparator
Результат char