[CMake] No FileIsSymlink(...) for Win32?

Gonzalo Garramuño ggarra at advancedsl.com.ar
Wed Nov 14 19:09:17 EST 2007


Pau Garcia i Quiles wrote:
> Windows 2000 Server, XP and 2003 Server, at least, include a linkd.exe 
> utility which creates actual symlinks. It only works on NTFS 
> filesystems, AFAIK, but it works well. Active Directory relies uses 
> linkd'd directories in several places (for instance, SYSVOL and 
> SYSVOL/domain).

Nope.  Contrary to Microsoft propaganda, those are not symbolic links 
but junction points.  Junction points offer a kind of limited symbolic 
link but only on directories.  Files are treated as hard-links.  And 
neither one can be relative or cross volumes.  They also suffer from 
problems with cycles.  And, as you say, only under a certain file 
system.  The windows api also does not expose these properly on a 
network either (unlike Samba), so OSes that are not those versions 
cannot access them.

Windows Vista includes the first real attempt to add symlinks, but they 
are still broken (and dramatically inferior) in comparison to Unix. 
Similar limitations: a max of 31 in a directory, relative symlinks 
cannot cross volumes, you manually need to distinguish between files and 
directories when creating or deleting them, they don't show up to other 
machines on the network that are not vista, etc.

So, in summary, no.  I stand by my statement.  No Microsoft OS to this 
day supports symbolic links.

-- 
Gonzalo Garramuño
ggarra at advancedsl.com.ar

AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy


More information about the CMake mailing list