Unit 'BaseUnix' Package
[Overview][Constants][Types][Procedures and functions][Index] [#rtl]

FpMkdir

Create a new directory.

Declaration

Source position: bunxh.inc line 81

function FpMkdir(

  path: PAnsiChar;

  Mode: TMode

):cint;

function FpMkdir(

  const path: RawByteString;

  Mode: TMode

):cint;

Description

FpMkDir creates a new directory Path, and sets the new directory's mode to Mode. Path can be an absolute path or a relative path. Note that only the last element of the directory will be created, higher level directories must already exist, and must be writeable by the current user.

On success, 0 is returned. if the function fails, -1 is returned.

Note: There exist a portable alternative to fpMkDir: system.mkdir. Please use fpMkDir only if you are writing Unix specific code. System.mkdir will work on all operating systems.

Errors

Extended error information can be retrieved using fpGetErrno.

See also

fpGetCWD

  

Retrieve the current working directory.

fpChDir

  

Change current working directory.


Documentation generated on: Dec 22 2024