Node:MkDir, Next:, Previous:MinReal, Up:Reference



MkDir

Synopsis


procedure MkDir (Directory: String);

Description

MkDir creates the given Directory, if its argument is a valid parameter to the related operating system's function. Otherwise a runtime error is caused.

Conforming to

MkDir is a Borland Pascal extension.

Example


program MkDirDemo;
var
  Foo: String (127);
begin
  WriteLn ('Enter directory name to create:');
  ReadLn (Foo);
  {$I-}  { Don't abort program on error }
  MkDir (Foo);
  if IOResult <> 0 then
    WriteLn ('Directory `', Foo, ''' could not be created')
  else
    WriteLn ('Okay')
end.

See also

ChDir, RmDir