From: LRN <lr...@gm...> - 2010-08-23 06:27:00
|
On 23.08.2010 8:40, JonY wrote: > On 8/23/2010 11:11, Patrick Marsh wrote: >> Thanks for the suggestions, Jon! >> >> Changing lstat to stat seemed to work, however defining S_ISLNK to be >> 0 didn't. I shouldn't be surprised. Thanks for the suggestion, >> though! >> > Hi, > > you can remove S_ISLNK entirely as well, since Windows doesn't have that > sort of Unix symlinks. > Not true. Since WINVER 6 (Vista) symlinks are available, and they are compatible with *nix symlinks (to some extent; see Wikipedia for details). API, however, does not match the *nix API for symlinks - no lstat(), symlink(), readlink(), link(), S_ISSLNK; and other CRT functions might not work with symlinks the way they do on POSIX-compilant systems. But that doesn't stop you from implementing such interface on top of WinAPI functions for symlinks and hardlinks. I did that (google for libntlink), and other people did too (Python 3.2 will have symlink support on Windows >= 6; Far Manager supports all kind of links, etc). |