uiop:ensure-pathname
(uiop:ensure-pathname pathname &key on-error defaults type dot-dot empty-is-nil want-pathname want-relative want-absolute ensure-absolute ensure-subpath want-file want-directory ensure-directory want-non-wild want-wild wilden want-existing ensure-directories-exist truename &allow-other-keys)
The constraint machine the rest of uiop routes through: coerces a designator (a
string goes through
uiop:parse-unix-namestring), then applies the
:want-* checks and :ensure-* transforms in upstream's order. A failed check
signals an error naming the pathname and the constraint, or calls a custom
:on-error function.
Lite next to upstream, deliberately: the report is Invalid pathname ~S: ~A,
and :want-logical always fails (no logical pathname exists). :truename
answers the truename, and :resolve-symlinks / :truenamize
resolve the symbolic links in the path as upstream does.
Backend support
Works on all four backends (Lisp source, uiop-pathname.lisp).