March 2000
Intermediate to advanced
576 pages
18h 13m
English
MkDir Procedure
procedure MkDir(const Directory: string)
Call MkDir to create a directory. If the directory
cannot be created, Delphi reports an I/O error using the Windows
error code, such as Error_Already_Exists if the
directory already exists.
You can include or omit a trailing backslash character in the directory name.
MkDir is not a real procedure.
// Create a directory, but only if it does not already exist.
procedure MakeDirectory(const Directory: string);
var
Search: TSearchRec;
begin
if FindFirst(Directory, faDirectory, Search) = 0 then
FindClose(Search)
else
MkDir(Directory);
end;| ChDir Procedure, GetDir Procedure, IOResult Function, RmDir Procedure |
Read now
Unlock full access