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

9.234 RmDir

Synopsis

 
procedure RmDir (Directory: String);

Description

`RmDir' removes 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

`RmDir' is a Borland Pascal extension.

Example

 
program RmDirDemo;
var
  Foo: String (127);
begin
  WriteLn ('Enter directory name to remove: ');
  ReadLn (Foo);
  {$i-}                     { Suppress exit on error }
  RmDir (Foo);
  if IOResult <> 0 then
    WriteLn ('Directory ', foo, ' could not be removed.')
  else
    WriteLn ('Okay.')
end.

See also

section 9.40 ChDir, section 9.161 MkDir



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