Skip to content
class method

Dir.delete

(::path dirname) -> 0
Dir.rmdir(dirpath) → 0

Removes the directory at dirpath from the underlying file system:

Example
Dir.rmdir('foo') # => 0

Raises an exception if the directory is not empty.

See also .chroot .each_child .children .empty? also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0