I'm not quite sure I undestand why we have all these classes and modules: Dir, File, FileUtils, FileTest and Pathname. I understand what each of these does, of course, but I don't understand why the clearly related functionality has been spread about.
I think a FileSystem class or module would be in order -- a system we could use in much the same manner as we use the command shell to access our filesystem.
fs = FileSystem.new fs.cd('/') entries = fd.ls entries.each do |e| if fs.directory?(e) ... else fs.open(e) { |f| ... } end end
It's not so common that we open files and harbor them, even less so for directories. But the FileSystem can have those defined within it too, and there's no reason to even draw them up yourself. FileSystem will do it for you:
Clearly this pretty straightforward and quite convenient. But best of all, this single point of entry into all things "file system" may lead to more interesting possibilities, in some respect similar to what FUSE offers us, only confined to Ruby's realm.
I wonder too how remote file transfers might fit into this... interesting considerations all.