[fpc-pascal]Detecting (sym)link in fpc/Linux
Cor Slot
cslot at xs4all.nl
Wed Sep 5 16:02:32 CEST 2001
Hi
How can see if a file is a link on a linux filesystem?
I'm trying to create a routine that recursively scans the filesystem
with findfirst, findnext, findclose. For each file I use fstat to get
info about the file.
When the program encounters a link to a directory it recurses into that
directory. When the link points to the same directory as the link is in
this gives an endless loop.
With the data I have from searchrec and stat, how can I determine that
the current file is a link? Or do I need another function to do that?
Thanx!
Cheers,
Cor.
cslot at xs4all.nl
==============================
Cor.J. Slot Rotterdam [NL]
Voice/FAXmail +31 84 851 04 78
==============================
More information about the fpc-pascal
mailing list