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

Pau Garcia i Quiles pgquiles at elpauer.org
Thu Nov 15 05:01:23 EST 2007


Quoting Gonzalo Garramuño <ggarra at advancedsl.com.ar>:

> 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.

You saved me a few hours of development. Thank you!

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)



More information about the CMake mailing list