I’m happy to announce the first release of guile-file-names, a file-name abstraction module for Guile.
The (file-names)
module provides methods for manipulating file names
(aka file paths, but for GNU Coding Standards reasons, the module
doesn’t refer to
"paths").
The module was built based on the idea that doing anything more than a
non-trivial modification of a file name string is a pain (making sure
all slashes are present and accounted for, resolving .
and ..
,
etc). Inevitably, you have to break the string up into chunks and
operate on that list of components. This module takes care of that
for you.
Theoretically, (file-names)
should also make handling file names
more portable between POSIX and Windows/Cygwin, however I don’t have
access to a Windows machine to test that assertion. Help in this
regard would be appreciated.
The module takes an object-oriented approach via GOOPS. This lets us
extend Guile primitive procedures to specialize on <file-name>
objects. Thus, all of the POSIX file-system
procedures
now also can accept <file-name>
instances in addition to the default
stringy file names.
Documentation is provided in an Info manual.
Download guile-file-names 0.1 [sig]
Development happens on Gitlab
Contributions in the form of testing, bug reports, feature requests and patches/pull requests are welcome! The ultimate goal would be to have the module merged upstream or into guile-lib once everyone agrees that it’s ready.