I’m happy to announce the release of guile-file-names 0.2.
(file-names) module provides methods for manipulating file
names. Its design distinguishes between the human-friendly string
format of filenames ("/usr/bin/guile") and a more Scheme-friendly
representation to take out all the little nuisances of working with
This release sees bugs fixed, under-the-hood improvements, and new features added. See below for an excerpt from the NEWS file.
If you use the library, please consider reporting any bugs you encounter or feature requests you might have on the issue tracker on Gitlab.
Native file-globbing sub-module
A new sub-module
(file-names glob) has been added. This module
glob, which is used to perform
"file-globbing." File-globbing is the method of finding multiple
files, e.g. at the shell, by matching wildcards
glob supports shell-style wildcards (*, ?,  and **) as
well as full regular expressions.
string->file-name now takes optional keyword arguments
This allows you to override system- or parsed- defaults for the volume, separator and case-sensitivity.
These new methods convert an absolute file name to a relative one by removing a leading directory prefix.
Specialized write and display methods for
Running write or display on a
<file-name> object now prints a
recognizable string representation of the file name rather than the
default cryptic GOOPS-object format:
scheme@(guile-user)> (use-modules (file-names)) scheme@(guile-user)> (define f (string->file-name "/usr/bin/guile")) scheme@(guile-user)> (simple-format #t "~a\n" f) #<<file-name> /usr/bin/guile>
Resolving an absolute file name
It is now an explicit error if there are double-dots at the root of the file name (e.g. "/../foo/bar"). Also, a bug was fixed where sequential double-dots ("../../../blah.txt") were not handled correctly.