Click or drag to resize
PathGetFileName Method (String)
Returns the file name and extension of the specified path string.

Namespace: Alphaleonis.Win32.Filesystem
Assembly: AlphaFS (in AlphaFS.dll) Version: 2.0
public static string GetFileName(
	string path


Type: SystemString
The path string from which to obtain the file name and extension. The path cannot contain any of the characters defined in GetInvalidPathChars.

Return Value

Type: String
The characters after the last directory character in path. If the last character of path is a directory or volume separator character, this method returns string.Empty. If path is null, this method returns null.
ArgumentExceptionThe path parameter contains invalid characters, is empty, or contains only white spaces.
See Also