[iolib-devel] file-path stuff and handling of trailing /

Attila Lendvai attila.lendvai at gmail.com
Sun Oct 10 11:24:38 UTC 2010


>> i repeatedly struggle due to this behavior:
>> (iolib.pathnames:file-path-directory (iolib.pathnames:file-path
>> "/tmp/")) => (:ROOT)
>
> What's the problem exactly ?

i list a few cases that doesn't match my expectations when it comes to
a high level lib dealing with file path parsing and manipulating:

(file-path-file-name (file-path "/tmp/foo/")) => "foo"

(file-path-file-type (file-path "/tmp/foo.bar/")) =>"bar"

(file-path-namestring (file-path "/tmp/foo/")) => "/tmp/foo"

this last one especially when interfacing with cl:ensure-directories-exist

--
 attila




More information about the iolib-devel mailing list