File.getName

Overview | Methods | This Package | All Packages

File.getName

Retrieves the name and extension of the specified path.

Syntax

public static String getName( String path )

Parameters

path

The path of a file or directory.

Return Value

Returns the name and extension of the specified path.

Remarks

The resulting string contains the characters of the path parameter that follow the last backslash (\) or colon (:) in the path parameter. The resulting string is the entire path if the path parameter does not contain either a backslash or a colon. The resulting string is null if the path parameter is null.

See Also   getDirectory, getExtension, getRoot