Filenames - SBCL 1.0.31 User Manual
Description: SBCL 1.0.31 User Manual

Previous: File-descriptors, Up: Types

##### 16.3.2.2 Filenames

— Type: sb-posix:filename

> A `string` designating a filename in native namestring syntax.

> Note that native namestring syntax is distinct from Lisp namestring syntax:

>                 (pathname "/foo*/bar")

> is a wild pathname with a pattern-matching directory component. `sb-ext:parse-native-namestring` may be used to construct Lisp pathnames that denote `posix` filenames as understood by system calls, and `sb-ext:native-namestring` can be used to coerce them into strings in the native namestring syntax.

> Note also that `posix` filename syntax does not distinguish the names of files from the names of directories: in order to parse the name of a directory in `posix` filename syntax into a pathname `my-defaults` for which

>                 (merge-pathnames (make-pathname :name "FOO" :case :common)
>                                   my-defaults)

> returns a pathname that denotes a file in the directory, supply a true `:as-directory` argument to `sb-ext:parse-native-namestring`. Likewise, 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`.

— Type: sb-posix:filename-designator

> Designator for a `filename:` a `string` designating itself, or a designator for a `pathname` designating the corresponding native namestring.

— Function: sb-posix:filename filename

> Converts `filename-designator` into a `filename`.