[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'FileUtil' (#lcl)

# DeleteDirectory

DeleteDirectory - Delete the named directory (or only its contents if OnlyChilds is True)

## Declaration

Source position: fileutil.pas line 71

`function DeleteDirectory(`
`const DirectoryName: String;`
`OnlyChilds: Boolean`
`):Boolean;`

## Arguments

`DirectoryName` |  | The name of the directory for processing
`OnlyChilds` |  | If True, only the contents ('children') of the directory are removed

## Function result

Returns True if the directory or its contents were correctly removed

## Errors

If there was an error, such as trying to removing . or .., or there were insufficient permissions, or the file did not exist, False is returned

The latest version of this document can be found at lazarus-ccr.sourceforge.net.