* POSIX and symbolic links ????
@ 1994-11-04 12:34 Fredrik Olsson
1994-11-06 21:04 ` Robert Dewar
1994-11-07 11:41 ` David Emery
0 siblings, 2 replies; 4+ messages in thread
From: Fredrik Olsson @ 1994-11-04 12:34 UTC (permalink / raw)
How does one check if a file is a symbolic link?
There seems to be no functionality in the POSIX Ada bindings
to do this...
Thanks,
Fredrik
--
Fredrik Olsson EMAIL: frol@celsiustech.se
Celera AB PHONE: +46 8 580 851 21
Box 26 FAX: +46 8 580 872 09
S-175 21 Jarfalla
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: POSIX and symbolic links ????
1994-11-04 12:34 POSIX and symbolic links ???? Fredrik Olsson
@ 1994-11-06 21:04 ` Robert Dewar
1994-11-06 21:14 ` Richard Kenner
1994-11-07 11:41 ` David Emery
1 sibling, 1 reply; 4+ messages in thread
From: Robert Dewar @ 1994-11-06 21:04 UTC (permalink / raw)
In a way it is a shame if a program *can* detect a symbolic link, because
then it means that symbolic links would not be transparent, and the great
attraction of this facility is precisely the transparency.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: POSIX and symbolic links ????
1994-11-06 21:04 ` Robert Dewar
@ 1994-11-06 21:14 ` Richard Kenner
0 siblings, 0 replies; 4+ messages in thread
From: Richard Kenner @ 1994-11-06 21:14 UTC (permalink / raw)
In article <39jgdi$bsq@gnat.cs.nyu.edu> dewar@cs.nyu.edu (Robert Dewar) writes:
>In a way it is a shame if a program *can* detect a symbolic link, because
>then it means that symbolic links would not be transparent, and the great
>attraction of this facility is precisely the transparency.
No, it's only important that the standard ways of accessing files
handle symbolic links transparently. There's no problem in providing
a separate mechanism that can be used to see if a file is a symbolic
link. You clearly need such a thing. If you didn't how would "ls" work
and display the link? There are other programs, such as tar, that have
a legitimate reason to know. Also, other similar file maintenance-type
programs such as "du".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: POSIX and symbolic links ????
1994-11-04 12:34 POSIX and symbolic links ???? Fredrik Olsson
1994-11-06 21:04 ` Robert Dewar
@ 1994-11-07 11:41 ` David Emery
1 sibling, 0 replies; 4+ messages in thread
From: David Emery @ 1994-11-07 11:41 UTC (permalink / raw)
The problem is that symbolic links are not part of POSIX.1. They're
included in the POSIX.1a supplement, for which there is no equivalent
Ada binding.
But look at the C documentation for the system call lstat(), which I
think is included in the POSIX.1a system calls. To quote from the man
page on my Sun:
lstat() is like stat() except in the case where the named
file is a symbolic link, in which case lstat() returns
information about the link, while stat() returns information
about the file the link references.
Note that using symbolic links in a way that is visible to the program
is not POSIX.5-compliant.
dave
--
--The preceeding opinions do not necessarily reflect the opinions of
--The MITRE Corporation or its sponsors.
-- "A good plan violently executed -NOW- is better than a perfect plan
-- next week" George Patton
-- "Any damn fool can write a plan. It's the execution that gets you
-- all screwed up" James Hollingsworth
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1994-11-07 11:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-11-04 12:34 POSIX and symbolic links ???? Fredrik Olsson
1994-11-06 21:04 ` Robert Dewar
1994-11-06 21:14 ` Richard Kenner
1994-11-07 11:41 ` David Emery
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox