[fpc-pascal] Handling recursive symlinks in Linux
Michael Van Canneyt
michael at freepascal.org
Sat Feb 19 10:05:05 CET 2011
On Sat, 19 Feb 2011, brian wrote:
> I'm trying to convert a Delphi console-mode program which needs to walk
> directory trees to FP **and Linux** - is there a standard way to detect and
> handle recursive symlinks, if the user has been daft enough to create them?
You can use faSymLink in FindFirst/FindNext to detect symbolic links (this works on
windows as well) and then use fpReadLink (unit baseunix) to see where the
link leads too.
Michael.
More information about the fpc-pascal
mailing list