Свойство | Тип | Описание | |
---|---|---|---|
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 |
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 |
public static Combine ( string path1, string path2 ) : string | ||
path1 | string | The first path. |
path2 | string | The second path. |
Результат | string |
public static GetDirectoryName ( string path ) : string | ||
path | string | The path of a file or directory. |
Результат | string |
public static GetExtension ( string path ) : string | ||
path | string | The path string from which to get the extension. |
Результат | string |
public static GetFileName ( string path ) : string | ||
path | string | The path string from which to obtain the file name and extension. |
Результат | string |
public static GetFileNameWithoutExtension ( string path ) : string | ||
path | string | The path of the file. |
Результат | string |
public static GetInvalidFileNameChars ( ) : char[] | ||
Результат | char[] |
public static GetInvalidPathChars ( ) : char[] | ||
Результат | char[] |
public static GetPathRoot ( string path ) : string | ||
path | string | The path from which to obtain root directory information. |
Результат | string |
public static GetPathWithoutFile ( string path ) : string | ||
path | string | |
Результат | string |
public static HasExtension ( string path ) : bool | ||
path | string | The path to search for an extension. |
Результат | bool |
public static IsPathRooted ( string path ) : bool | ||
path | string | The path to test. |
Результат | bool |
public static char AltDirectorySeparatorChar | ||
Результат | char |
public static char DirectorySeparatorChar | ||
Результат | char |