411 REFERENCE · Wikibooks
Ruby Programming/Standard Library/Pathname
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Pathname
# Pathname represents a pathname which locates a file in a filesystem.
...
# It does not represent the file itself.
# A Pathname can be relative or absolute. It's not until you try to
# reference the file that it even matters whether the file exists or not.
# 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.
To use it:
require 'pathname'