A filename is a string.
A pathname is a designator for a filename: the filename is computed using the same mechanism that SBCL uses to map pathnames to OS filenames internally.
Note that filename syntax is distinct from namestring syntax, and that
SB-EXT:PARSE-NATIVE-NAMESTRING
may be used to construct
Lisp pathnames that denote POSIX filenames returned by system calls.
See Function sb-ext:parse-native-namestring. Additionally, notice
that POSIX filename syntax does not distinguish the names of files
from the names of directories. Consequently, in order to parse the
name of a directory in POSIX filename syntax into a pathname
defaults
for which
(merge-pathnames (make-pathname :name "FOO" :case :common) defaults)
returns a pathname that denotes a file in the directory, supply a true
AS-DIRECTORY
argument to SB-EXT:PARSE-NATIVE-NAMESTRING
.
Likewise, if it is necessary to supply the name of a directory to a
POSIX function in non-directory syntax, supply a true AS-FILE
argument to SB-EXT:NATIVE-NAMESTRING
.