One of the best resources can be the language docs which, in this case, is
[To see links please register here]
Dir is working with directories, and examples include listing the current working directory (`pwd`), making directories and deleting them.
File is similar to Dir but instead deals with working with Files, such has getting and changing permissions, creating files and deleting them.
Pathname is peculiar, as you say, because it does include all the functionality of File and some of that of Dir, but if you read the docs it tells you exactly why it is there. From
[To see links please register here]
:
> The value of this class is to manipulate file path information in a neater way than standard Ruby provides. The examples below demonstrate the difference. All functionality from File, FileTest, and some from Dir and FileUtils is included, in an unsurprising way. It is essentially a facade for all of these, and more.
Hope that helps explain things.