[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.161 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

section 9.40 ChDir, section 9.234 RmDir



This document was generated by Frank Heckenbach on May, 10 2002 using texi2html