Deleting a directory

You can delete a directory by using the removeDirectory function as shown in the following example:

<cfset removeresponse = cfclient.file.removeDirectory(“myNewDir”)>

Method summary

removeDirectory(dirPath,recurse) - Delete specified directory

  • returns – a boolean to indicate the success of operation
  • params
    • dirPath – The absolute or relative path to the directory that needs to be deleted (including the directory name).
    • recurse - boolean to indicate whether the directory should be removed recursively.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy