From: Martin DeMello Date: 2004-06-15T01:18:37+09:00 Subject: Re: mkdir -p Yukihiro Matsumoto wrote: > Hi, > > In message "Re: mkdir -p" > on 04/06/14, Martin DeMello writes: > > |> FileUtils.mkdir_p(path) > | > |Thanks. Why doesn't FileUtils mix this into Dir? > > Dir methods are one to one relationship to the system calls. > FileUtils are more abstract/higher level/uniformed way to operate on > files/directories. This feels wrong to me - it goes back to the "closed classes" paradigm of adding a module simply to store a bunch of high level functions. I don't know if it's just me, but I'm *always* taken aback when something I'm looking for turns up in FileUtils rather than attached to the object it acts upon. On the other hand, perhaps mkdir doesn't belong as part of Dir - perhaps we should consider renaming FileUtils to FileSystem and aliasing it so as not to break old code - FileSystem.mkdir just reads more rubyishly to me. martin