Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Dir.rmdir

Dir.delete( string ) → 0
Dir.rmdir( string ) → 0
Dir.unlink( string ) → 0

Deletes the named directory. Raises a subclass of SystemCallError if the directory isn’t empty.

See also .pwd .tmpdir .open .unlink also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0