DirectoryDelete()

edit

Deletes directory for given path

DirectoryDelete( path=string, recurse=boolean );

Returns: void

Argument Description
path
string, required
edit

Absolute path of the directory to be deleted

recurse
boolean, optional
edit

Delete content of the directory.

Default is false.

Alias: recursive

Examples

edit
directorydelete("DirectoryPath");

Do not throw when the directory does not exist ( since Lucee 9.0.0.564 )

// no exception when the directory is already gone, for example when another thread removed it
directoryDelete( path="my/path/to/dir", recurse=true, throwOnMissing=false );

See also