DirectoryDelete()
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
editdirectorydelete("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
- File handling
- DirectoryCopy()
- DirectoryCreate()
- DirectoryExists()
- DirectoryList()
- DirectoryRename()
- <cfdirectory>
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)