CreateDirectory

Mon 01 January 2018

Syntax

CreateDirectory(path, [, pathtype])

Description

Use the CreateDirectory function to create the directory specified by path and any non-existent directories specified in path .

Important! The CreateDirectory function can be used to create a directory on an existing Windows share—for example, \\my_server\my_share\mydir. However, if the root of a Windows share (for example, \\my_server\my_share) is passed to CreateDirectory, the function will always fail.

On UNIX systems, the directory has the mode 755, that is, read-write-execute permission for the owner, while group and other have only read and execute permission.

drwxr-xr-x

Parameters

Field or Control

Definition

path

Specify the path to be created.

pathtype

Use this parameter to specify whether the path is an absolute or relative path. The valid values for this parameter are:

  • %FilePath_Relative (default)

  • %FilePath_Absolute

If you don’t specify pathtype the default is %FilePath_Relative.

If you specify a relative path, that path is appended to the path constructed from a system-chosen environment variable. A complete discussion of relative paths and environment variables is provided in documentation on the File class.

See .

If the path is an absolute path, whatever path you specify is used verbatim. You must specify a drive letter and the complete path. You can’t use any wildcards when specifying a path.

The Component Processor automatically converts platform-specific separator characters to the appropriate form for where your PeopleCode program is executing. On a Windows system, UNIX "/" separators are converted to "\", and on a UNIX system, Windows "\" separators are converted to "/".

Note: The syntax of the file path does not depend on the file system of the platform where the file is actually stored; it depends only on the platform where your PeopleCode is executing.

Returns

None.