DeleteDirectory function
Deletes the specified directory (or only its contents when
OnlyChildren is
True).
Declaration
function DeleteDirectory(const DirectoryName: string;
OnlyChildren: Boolean; Force: Boolean;
out Culprit: string): BooleanDescription
Returns True when the specified entries are deleted on the local file system. Returns False when:
- DirectoryName is one of the relative path indicators like '.' or '..'
- DirectoryName is an empty string ('')
- DirectoryName does not exist on the local file system
- The process does not have permissions needed to delete the directory or its content
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
