[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'sysutils' (#rtl) |
Create a new directory
Source position: diskh.inc line 20
function CreateDir( |
const NewDir: String |
):Boolean; |
CreateDir creates a new directory with name NewDir. If the directory doesn't contain an absolute path, then the directory is created below the current working directory.
The function returns True if the directory was successfully created, False otherwise.
In case of an error, the function returns False.
|
Remove a directory from the filesystem. |
Program Example26; { This program demonstrates the CreateDir and RemoveDir functions } { Run this program twice in the same directory } Uses sysutils; Begin If Not DirectoryExists('NewDir') then If Not CreateDir ('NewDir') Then Writeln ('Failed to create directory !') else Writeln ('Created "NewDir" directory') Else If Not RemoveDir ('NewDir') Then Writeln ('Failed to remove directory !') else Writeln ('Removed "NewDir" directory'); End.
No notes exist for this page yet.