IDirectory.CreateDirectory

Syntax

CreateDirectory(Path: String);

Parameters

Path - a path to a directory that should be created.

Description

The CreateDirectory method creates a specified directory.

Comments

If directory already exists, an exception is generated.

Example

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

While executing this example it is checked whether directory, specified in the parameter sPath, is present in file system. If a directory does not exist it is created.

See also:

IDirectory