dirGetParent

dirGetParent

Returns an object representing the parent directory of the current directory or file.

Method of

File object

Syntax

FileSpecObject dirGetParent( FileSpecObject fileOrDir );

Parameters

The dirGetParent method has the following parameters:

fileOrDir
A FileSpecObject representing the pathname of the file or directory whose parent is being requested.

Returns

A FileSpecObject if successful; null if not successful.

Example

f = getFolder("Program", "myNewDirectory");
err = File.dirCreate(f);
err = File.getParent(f) // returns "Program"

Document Tags and Contributors

Contributors to this page: Sheppy, trevorh, Fredchat, Rod Whiteley
Last updated by: Sheppy,
Hide Sidebar