Contents | Prev | Next

7.4.31 The mkdir procedure

Description

The mkdir procedure creates a new directory/folder. If the directory/folder already exists then the mkdir procedure call will fail.

Parameter

  1. The first parameter is an expression of string type or char type which is the name of the directory/folder to create. If the directory/folder being created is a sub-directory/sub-folder then the parent directories/folders must exist.
  2. The second parameter is optional, and if supplied is an expression of integral type which specifies permissions for the directory/folder being created. The permission constants can be used to specify directory/folder permissions. If this parameter is not supplied then the default permissions are used. NOTE: Some operating systems like Windows ignore this parameter.

Example

The following call to create the directory/folder c:\irie\test will fail if the directory/folder c:\irie does not already exist.

   mkdir('\irie\test') makes the directory 'test' in
                           the directory '\irie'

Portability

Operating Systems: All
Standard Pascal: No

Contents | Prev | Next