baumanj
4/7/2006 3:58:00 PM
If you're working on unix-based systems*, I'd definitely recommend
using the Pathname class. It provides the children method that does
what you're looking for more cleanly than Dir.glob('*') and provides
lots of other conveniences.
* Basically anything but Windows, Pathname should have Windows support
in Ruby 2.0
Brad Tilley wrote:
> Why does Dir.entries include '.' and '..'? I'm accustomed to Python's
> os.listdir() which explicitly excludes these. How is this done in Ruby?