Microsoft SDK for Java

File.hasExtension

Determines whether a path includes a file extension.

Syntax

public static boolean hasExtension( String path )

Parameters

path

The path to test.

Return Value

Returns true if the characters that follow the last backslash (\) or colon (:) in the path include a period (.); otherwise, returns false.

See Also   changeExtension, getExtension

© 1999 Microsoft Corporation. All rights reserved. Terms of use.