See Original text in context
sub rmdir(* --> List)method rmdir(IO::Path: --> True)
Remove the invocant, or in sub form, all of the provided directories in the given list, which can contain any Cool
object. Only works on empty directories.
Method form returns True
on success and returns a Failure of type X::IO::Rmdir
if the directory cannot be removed (e.g. the directory is not empty, or the path is not a directory). Subroutine form returns a list of directories that were successfully deleted.
To delete non-empty directory, see rmtree in File::Directory::Tree
module.