Index:
[thread]
[date]
[subject]
[author]
From: Garrett Mitchener <wgm2@acpub.duke.edu>
To :
Date: 03 Mar 1999 21:40:22 -0500
Re: Symbolic Link Detection
Carl Robert Knerr <crk5@duke.edu> writes:
> I've been searching for a way to determine from a DirEntry whether or not
> a file is a symbolic link. I can't find a way of testing for this
> anywhere. So far, the best I could find was that in the file type
> descriptor field, an "l" popped up when the file was a link. However it
> is does this for hard and symbolic links. And on that note, what are we
> supposed to do, if anything, with hard links?
>
> Carl
Don't worry about hard links. They have to do with files that are
members of more than one directory. (There is an nlink field in the
stat struct...)
For more info on lstat and info about certain macros which can tell
you if the info in a stat structure, go to the 108 help page, down to
the GNU C library documentation section, take the link underneath it
to file system stuff, and page down until you get to stat and lstat.
Keep going and you'll find some good stuff.
-- Garrett :-)
Index:
[thread]
[date]
[subject]
[author]