[Openmcl-devel] pathnames vs filenames
Denis Bodyak
budden-lisp at mail.ru
Tue Feb 24 12:44:45 PST 2009
Hallo Gary, all!
GB> What is the md5.asd.lnk issue ?
Well, now I see you point. I revisited a standard and was surprised to find
that namestrings are (likely) not required to correspond to filenames.
But I'd like to note than in lispworks and clisp there is an evident
normalization rule (win32):
(pathname-type #P"a.b.c") -> "c"
(pathname-name #P"a.b.c") -> "a.b"
(namestring #P"a.b.c") -> "a.b.c"
sbcl at linux acts so too. I do not state that this rule is correct,
but it seem to be less problematic for my particular case.
So, I hope when we are in lisp, all would likely work.
It is so on Linux. (probe-file (car (directory "/home/denis/clbuild/systems/*.asd.lnk")))
returns true value and pathname even corresponds to filename so it can be used in commands.
In win32, md5'.asd.lnk does not correspond to a filename. I also can't check this
directory/probe-file test, as directory function always returns nil.
GB> One consequence of the escaping is that you can't just pass a
GB> lisp namestring to foreign code:
Yes, now I see that.
GB> (with-cstrs ((cname (ccl::native-translated-namestring path)))
GB> (#_do_something cname))
Thanks, it is a good news that I can address files afterall :)
GB> Cygwin introduces its own set of problems (for example, if a non-Cygwin
GB> process is running under a Cygwin shell, a ^C terminates that process.)
Ok, so I think I won't install it now.
Thanks one more time for replies.
Best regards, Budden
More information about the Openmcl-devel
mailing list