File.getParent

File.getParent

Class Overview | Class Members | This Package | All Packages

Syntax
public String getParent()
Description
Returns the parent part of the pathname of this File object, or null if the name has no parent part. The parent part is generally everything leading up to the last occurrence of the separator character, although the precise definition is system dependent. On UNIX, for example, the parent part of "/usr/lib" is "/usr", whose parent part is "/", which in turn has no parent. On Windows platforms, the parent part of "c:\java" is "c:\", which in turn has no parent.

See Also
getPath, getCanonicalPath, separator