getDirectory


Purpose

Creates or looks up a directory.

Signature

DirectoryEntry.getDirectory( path, options, successCallback, errorCallback )

Returns

This method does not return anything.

Parameter

Name Description Type Use
path Either an absolute path or a relative path from this DirectoryEntry to the directory to be looked up or created. DOMstring required
options
  • If create and exclusive flags are both true and the path already exists, the getDirectory method must fail.

  • If the create flag is true, the path doesn't exist, and no other error occurs, the getDirectory method must create and return a corresponding DirectoryEntry.

  • If the create flag is not true and the path doesn't exist, the getDirectory method must fail.

  • If the create flag is not true and the path exists, but is a file, the getDirectory method must fail.

Flags optional
successCallback A callback that is called to return the DirectoryEntry selected or created. function optional
errorCallback A callback that is called when errors happen. function optional

The Flags type is a simple JavaScript Object with the following strucuture:

{
  boolean create,
  boolean exclusive
}

Related topics

DirectoryEntry
Overview
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...