A file "my-file" is in directory "/my-directory," so the full path
of that file is "/my-directory/my-file":
Allegro CL 4.1 running On SunOS Release 4.1.2,
(probe-file "/my-directory/my-file") -> #p"/my-directory/my-file"
(probe-file "/my-directory/my-file/") -> NIL
Allegro CL 4.1 running On SunOS Release 4.1.3 (note a different release of OS)
(probe-file "/my-directory/my-file") -> #p"/my-directory/my-file"
(probe-file "/my-directory/my-file/") -> #p"/my-directory/my-file/"
^^^^^^^^^^^^^^^^^^^^^^^^^^
Is this a bug? And importantly, is there any other way to distinguish between
a directory and a file, without using probe-file? Thanks in advance for any
pointers.
Pei-yu Huang
In article <··········@cnsnews.Colorado.EDU> ······@spot.Colorado.EDU (Pei-yu Huang) writes:
>Allegro CL 4.1 running On SunOS Release 4.1.3 (note a different release of OS)
> (probe-file "/my-directory/my-file") -> #p"/my-directory/my-file"
> (probe-file "/my-directory/my-file/") -> #p"/my-directory/my-file/"
It's just inheriting SunOS's behavior. Sun changed the system in 4.1.3 so
that trailing slashes are always ignored (they misinterpreted a POSIX
requirement). Try "cat /my-directory/my-file/" from the shell and you'll
see the same behavior.
>Is this a bug? And importantly, is there any other way to distinguish between
>a directory and a file, without using probe-file? Thanks in advance for any
>pointers.
Try:
(probe-file "/my-directory/my-file/.")
--
Barry Margolin
System Manager, Thinking Machines Corp.
······@think.com {uunet,harvard}!think!barmar