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

Stelian Ionescu sionescu at cddr.org
Sat Oct 9 19:43:35 UTC 2010


On Wed, 2010-10-06 at 02:11 +0200, Attila Lendvai wrote:
> Stelian, i still think that it's not the right way to deal with directories...
> 
> i repeatedly struggle due to this behavior:
> (iolib.pathnames:file-path-directory (iolib.pathnames:file-path
> "/tmp/")) => (:ROOT)

What's the problem exactly ?

> i understand how posix behaves, but i think it's unrelated when it
> comes to file-paths dropping the leading slashes. some posix C calls
> are not the same as a high-level library storing separate path
> components internally in an object and providing such high-level
> functions as merging...
> 
> imho, it should be either that:
>  1) we go the posix way, but then don't define high level functions
> like file-path-directory

f-p-d is just the equivalent of the shell command "dirname"

>  2) do define a file-path-directory, but make it so that:
> (iolib.pathnames:file-path-directory (iolib.pathnames:file-path
> "/tmp/")) => (:ROOT "tmp")

this is not what dirname does

-- 
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/iolib-devel/attachments/20101009/6861e287/attachment.sig>


More information about the iolib-devel mailing list