routine rmdir

Documentation for routine rmdir assembled from the following types:

class IO::Path

From IO::Path

(IO::Path) routine rmdir

Defined as:

sub    rmdir(*@dirs --> List:D)
method rmdir(IO::Path:D: --> 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.