-
Notifications
You must be signed in to change notification settings - Fork 7.3k
do fs.symlink works on windows(for folders) #2274
Comments
You need to run node.exe with administrative rights for that to work. |
launched a shell as admin mkdir dirA node --eval "require('fs').symlinkSync('dirA', 'symA')" this gives me a symlinked file named node v0.6.5 i'd expect a symlink in of type "File folder" instead of "File" when a symlink for a Folder is created |
@Bonuspunkt for this reason fs.symlink has an additional mkdir dirA node --eval "require('fs').symlinkSync('dirA', 'symA', 'dir')" (I'm going to make sure this is reflected in the docs). |
As far as I see in the corresponding section, it is not reflected in the docs. |
it is now - d6bae2c |
Thank you for the helpful bit of the documentation. |
@igorzi works as expected. the problem is, if you enter the wrong type, the symlink is unusable. |
Ok, I think we can improve the default for existing targets, and correctly pick 'file' or 'dir'. I'll get this fixed. |
hi, everyone fs.link() on windows use CreateHardLinkW "Establishes a hard link between an existing file and a new file. This function is only supported on the NTFS file system, and only for files, not directories." So it dosen't work on directories . |
@AndrewGoal fs.link != fs.symlink. |
Tryed to use fs.linkSync(), fs.symlinkSync() on windows7, but only errors captched...
Program Linkd.exe from Microsoft Windows 2000 Resource Kit can link folders on WinXP,Vista,7...
so... node must do this.
The text was updated successfully, but these errors were encountered: