Richard M Kreuter <kreuter@...> writes:
> Christophe Rhodes writes:
>> Well, the first thing to realise is that namestrings don't really
>> correspond to a Unix file name...
> Groan. I knew that this was the case for logical pathname namestrings,
> but I'd thought that the standard meant for other namestrings to be
> usable as filenames according to the file system's conventions. I guess
> I'll have to read chapter 19 more closely.
Well, consider :wild. If that's unparsed as "*", then how do you
unparse a literal *? Probably as "\\*", but now you are incompatible
with the file system. (You're compatible with the shell, of course,
in this case, but then consider :wild-inferiors...)
>> Right, because the way that a pathname is converted to a Unix filename
>> is different from the way in which it's converted into a namestring.
> In that case, what is the suggested way of making a Unix filename out of
> a pathname, for example, to hand off to a Unix command?
In SBCL, you can use NATIVE-NAMESTRING and PARSE-NATIVE-NAMESTRING,
but I think when I wrote those I expected them to have the same kind
of round-trip behaviour that NAMESTRING/PARSE-NAMESTRING are meant to.
In general, for portable code, I don't know of a way.
> (The pathname in question is constructed by asdf, which doesn't ensure
> that component-pathnames have namestrings that are usable as file system
> filenames, and which sets the pathname-type of a static-file component
> to nil. Since vanilla asdf doesn't do anything with static-files,
> nothing in asdf itself gets caught on this, but asdf extensions may do
> so, e.g., to print files in a system via Unix commands.)
Mm, that's a good point. I don't really know how to solve this, I'm