From: E F van de Laar Date: 2003-10-26T20:22:21+09:00 Subject: Re: How to delete a directory? * Daniel Carrera (dcarrera@math.umd.edu) wrote: > Hi all, > > I've read through the Pickaxe documentation, and the output from 'ri'. I > want to delete a directory, but I honestly can't figure out how. The File > class doesn't seem to have a method for this. emiel@marvin:/usr/lib/ruby/1.8> ri Dir.delete ------------------------------------------------------------ Dir::delete Dir.delete( aString ) -> 0 ------------------------------------------------------------------------ Deletes the named directory. Raises a subclass of SystemCallError if the directory isn't empty. If you are using Ruby 1.8 you should check out 'FileUtils'. It allows you to do recursive deletes among other things. Emiel -- E F van de Laar www.il.fontys.nl/~emiel