Node:RmDir, Next:Round, Previous:Rewrite, Up:Reference
procedure RmDir (Directory: String);
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.
RmDir is a Borland Pascal extension.
program RmDirDemo;
var
Foo: String (127);
begin
WriteLn ('Enter directory name to remove: ');
ReadLn (Foo);
{$I-} { Don't abort on I/O errors }
RmDir (Foo);
if IOResult <> 0 then
WriteLn ('Directory ', Foo, ' could not be removed.')
else
WriteLn ('Okay.')
end.