guile-file-names is a module for the Guile programming language, a dialect of Scheme. The module provides functionality for programmatically manipulating file names.
The module is built around the opinion that the canonical string
representation of file names (e.g.
"/etc/foo/bar") is useful for
humans to input and read, but it is a pain to do any non-trivial
manipulations of it (especially if it has been inputted by one of said
humans). Inevitably, that string ends up getting pulled apart anyway,
so let’s start from that point. The functionality is similar to, but
not based upon, file name modules in other Scheme implementations and
in Common Lisp. In particular, only POSIX and Windows-style file
names are supported (sorry, MULTICS users!).
(file-names) module is intended to complement Guile’s built-in
Accordingly, for each of the relevant file-system procedures, there
exists a version that accepts file-name objects as arguments instead
of string values in the default, generic method.
A word on terminology
Note that here we when refer to a "file name", we also include the
hierarchy of directories that contain the file. We avoid using the
words "pathname" or "path" in accordance with the GNU Coding
to avoid confusion with search paths for executables (e.g. the
environment variable). Also keep in mind that, at least on a POSIX
system, a directory is itself a special kind of file. Lastly, when we
want to refer directly to the "path" of directories that one must
traverse to find a file, we call it a "route".