C# Class DroidExplorer.Core.IO.Path

Afficher le fichier Open project: camalot/droidexplorer

Méthodes publiques

Свойство Type Description
AltDirectorySeparatorChar char
DirectorySeparatorChar char
PathSeparator char

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

ChangeExtension() public static méthode

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.
Résultat string

Combine() public static méthode

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.
Résultat string

GetDirectoryName() public static méthode

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.
Résultat string

GetExtension() public static méthode

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.
Résultat string

GetFileName() public static méthode

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.
Résultat string

GetFileNameWithoutExtension() public static méthode

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.
Résultat string

GetInvalidFileNameChars() public static méthode

Gets an array containing the characters that are not allowed in file names.
public static GetInvalidFileNameChars ( ) : char[]
Résultat char[]

GetInvalidPathChars() public static méthode

Gets an array containing the characters that are not allowed in path names.
public static GetInvalidPathChars ( ) : char[]
Résultat char[]

GetPathRoot() public static méthode

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.
Résultat string

GetPathWithoutFile() public static méthode

public static GetPathWithoutFile ( string path ) : string
path string
Résultat string

HasExtension() public static méthode

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.
Résultat bool

IsPathRooted() public static méthode

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.
Résultat bool

Property Details

AltDirectorySeparatorChar public_oe static_oe property

public static char AltDirectorySeparatorChar
Résultat char

DirectorySeparatorChar public_oe static_oe property

public static char DirectorySeparatorChar
Résultat char

PathSeparator public_oe static_oe property

public static char PathSeparator
Résultat char