New in package 167
Syntax
FileSystem.directory( location[, options ] );
Description
Creates a Directory object representing the specified directory.
Parameters
Parameter | Type | Description |
---|---|---|
location | String or Directory | Path or parent directory, see options.name below. |
options.name | String | Directory name; if specified, location is interpreted as a parent directory path; required if location is a Directory. |
options.create | Boolean | Create a new directory. Fail if the directory exists unless one of the additional create options below is specified. |
create options
options.merge | Boolean | Merge with an existing directory, if any. |
options.clear | Boolean | Clear an existing directory, if any. |
options.unique | Boolean | Append a unique suffix to the name if the destination directory already exists. |
options.temporary | Boolean | Temporary directories are deleted automatically; implies unique. |
Examples
Create Job folder structure if it doesn't exist: