Question
directoryCreate() throws error even after ensuring it doesn't exist
<cfif not directoryExists(arguments.dirPath)>
<cfset directoryCreate(arguments.dirPath)>
</cfif>Even after checking that the directory doesn't exist, directoryCreate() fails with:
Message: The specified directory {directoryPath} could not be created.
Detail: The most likely cause of this error is that {directoryPath} already exists on your file system.Ultimately, I want to delete it to quickly clear all files, then recreate it.
I can instead loop through the directory to delete the files, but removing the directory altogether does the job when it's not being weird about whether or not it exists.
