Re: parse-namestring and logical pathnames
- From: Marco Antoniotti <marcoxa@xxxxxxxxx>
- Date: Sun, 28 Sep 2008 08:05:18 -0700 (PDT)
On Sep 28, 3:15 pm, p...@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon)
wrote:
Madhu <enom...@xxxxxxxx> writes:
* (Pascal J. Bourguignon) <87vdwgr5qp....@xxxxxxxxxxxxxxxxxxxxxxxx> :
Wrote on Sun, 28 Sep 2008 11:15:26 +0200:
| Madhu <enom...@xxxxxxxx> writes:
|
|> * (Pascal J. Bourguignon) <87bpyat7kq....@xxxxxxxxxxxxxxxxxxxxxxxx> :
|> Wrote on Sat, 27 Sep 2008 08:40:37 +0200:
|> |
|> | I fail to see the point of using logical pathname if it is not to do
|> | it in a manner that is strictly and portably standard conformant.
|>
|> There may be NO WAY to do this; Especially if TRANSLATE-LOGICAL-PATHNAME
|> is required and you use uppercase in your logical pathname strings.
|
| Yes. Just use only logical pathname to both write and read the file
| system, never try to access any other file (with logical pathnames).
I disagree with this. Rainer is on the dot here.
| I know this allegro specific behavior.
|
| If you're after ~/foo.lisp, you shouldn't use logical pathnames.
Thats nonsense.
I always mean "portably", which I forgot to mention in that sentence.
But you're right, there's one way to use logical pathnames portably to
access any file which can be designated by a physical pathname in your
implementations. See below.
The whole point is to define a translation to access
physical pathnames using logical pathnames. I can define the mapping of
"HOME:foo.lisp" => "~/foo.lisp" inside the translations.
A logical pathname with lowercase characters has an implementation
dependant semantics. If you are lucky, you will be able to access the
same file using that logical pathname with two different
implementations (it happens to be the case with clisp and allegro for
example), but there's no guarantee you'll be able to do so with a third one.
The specific scenario you suggest where an application will want to 1)
create files and 2) only read those created files and no others are
comparitively few. All that can be said is that LPNs in the spec cover
this scenario.
Note: Allegro is the only implementation that does NOT frob the case of
the specified pathname in ANY WAY. I find that useful behaviour. The
fact that other implementations frob the name during translation is the
problem[1].
We could agree there. What we really need is more homogeneous
processing of pathnames in the various implementations running on a
given platform.
Allow me to insist: http://common-lisp.net/project/names-and-paths
Cheers
--
Marco
.
- References:
- parse-namestring and logical pathnames
- From: Steven E. Harris
- Re: parse-namestring and logical pathnames
- From: Pascal J. Bourguignon
- Re: parse-namestring and logical pathnames
- From: Madhu
- Re: parse-namestring and logical pathnames
- From: Pascal J. Bourguignon
- Re: parse-namestring and logical pathnames
- From: Madhu
- Re: parse-namestring and logical pathnames
- From: Pascal J. Bourguignon
- parse-namestring and logical pathnames
- Prev by Date: Re: parse-namestring and logical pathnames
- Next by Date: Re: parse-namestring and logical pathnames
- Previous by thread: Re: parse-namestring and logical pathnames
- Next by thread: Re: parse-namestring and logical pathnames
- Index(es):
Relevant Pages
|