IDirectory.CreateDirectory

Syntax

CreateDirectory(Path: String);

Parameters

Path - path to a directory that must be created.

Description

The CreateDirectory method creates the specified directory.

Comments

If the directory already exists, an exception is thrown.

Example

Sub UserProc(sPath: String);
Begin
    If Not Directory.Exists(sPath) Then
        Directory.CreateDirectory(sPath);
    End If;
End Sub UserProc;

On executing the example it is checked if the directory specified in the sPath parameter is present in the file system. If the directory does not exist, it is created.

See also:

IDirectory