Skip to content

removeDir

function removeDir(string calldata path, bool recursive) external;

Removes a directory at the provided path. This cheatcode will revert in the following situations, but is not limited to just these cases:

  • path doesn’t exist.
  • path isn’t a directory.
  • User lacks permissions to modify path.
  • The directory is not empty and recursive is false. path is relative to the project root.