XPInstall API Reference:File Object:Methods:dirGetParent
From MDC
Contents |
[edit] dirGetParent
Returns an object representing the parent directory of the current directory or file.
[edit] Method of
File object
[edit] Syntax
FileSpecObject dirGetParent( FileSpecObject fileOrDir );
[edit] Parameters
The dirGetParent method has the following parameters:
fileOrDir- A FileSpecObject representing the pathname of the file or directory whose parent is being requested.
[edit] Returns
A FileSpecObject if successful; null if not successful.
[edit] Example
f = getFolder("Program", "myNewDirectory");
err = File.dirCreate(f);
err = File.getParent(f) // returns "Program"