Determines whether a path includes a file name extension.
Namespace:
Alphaleonis.Win32.Filesystem
Assembly:
AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax public static bool HasExtension(
string path
)
Public Shared Function HasExtension (
path As String
) As Boolean
public:
static bool HasExtension(
String^ path
)
static member HasExtension :
path : string -> bool
Parameters
- path
- Type: SystemString
The path to search for an extension. The path cannot contain any of the characters defined in GetInvalidPathChars.
Return Value
Type:
Boolean if the characters that follow the last directory separator (\\ or /) or volume separator (:) in the path include a period (.) followed by one or more characters; otherwise,
.
Exceptions See Also