File.getRoot

Overview | Methods | This Package | All Packages

File.getRoot

Retrieves the root portion of the specified path.

Syntax

public static String getRoot( String path )

Parameters

path

The path of a file or directory.

Return Value

Returns the root portion of the specified path.

Remarks

The resulting string consists of the rightmost characters that make up the root of the path. Possible patterns for the resulting string are:

The resulting string is null if path is null.

See Also   getDirectory, getExtension, getName, isRooted