I've been Google searching this I may be having some brain clouds because it just isn't working.
I need to detect if a folder is a junction so my recursive file search doesn't run off into an endless loop.
I could use a simple function like
IsJunction(attr: dword): boolean;
where attr is dwFileAttributes
from TWin32FindData;
I just can't seem to get it to work. Thanks!
dwFileAttributes
ofTWin32FindData
does not have that information, you have to look to thedwReserved0
field. See documentation.You can try also
JCL
(JEDI Code Library)JclNTFS
unit.it has a few methods to deal with junctions e.g:
NtfsIsFolderMountPoint
/NtfsGetJunctionPointDestination
.