Delete a directory at a given path. Without a beginning forward slash, the path will default to the user’s home directory. When using a forward slash at the beginning of a path, the path must be absolute. The operation will only be successful if the target directory is empty. Examples:

  • emptyFolder -> Delete a directory called “emptyFolder” in your home directory
  • /pathToHomeDirectory/emptyFolder -> Delete a directory called “emptyFolder” in your home directory, inputting the absolute path
  • /differentPath/emptyFolder -> Delete a directory called “emptyFolder” somewhere other than your home directory, using an absolute path
  • someFolder/emptyFolder -> Delete a folder called “emptyFolder” inside of an existing folder in your home directory.

Inputs:

  • Directory Path - The path to the directory that you want to delete