I think you're confusing hard links and soft links (symlinks). A symlink is like a shortcut (and probably is represented as one on Windows). A hard link plays the same role as the original filesystem entry: it exposes an inode as an entry in a directory. A hard link is indistinguishable from a regular file — because for all intents and purposes, it is a regular file — with the only noticeable difference being that it shares the same inode (and therefore, permissions, attributes, and contents) as the source file. Even though they appear to be different files, if you change one, the change will be reflected in the other because they share a physical data location on disk.
In short, a symlink is a pointer to a filename that the operating system is capable of resolving. A hard link is a way to associate more than one filename with a physical "file". It's also worth noting that hard links are only supported on Windows on NTFS filesystems. http://en.wikipedia.org/wiki/Hard_link Hope that helps! -Matt On May 24, 2012, at 8:58 AM, Andrew Goal wrote: > fs.link() on windows makes a file same as srcFile, I guess it isn't a > link file. > > But I don't know what is the true hard link file created by > CreateHardLinkW() , is it like a shortcut .lnk file created by context > menu with mouse right click? > > How can I recognise a file is a hard link file on windows? > > my nodejs: > > versions: > { node: '0.6.15', > v8: '3.6.6.24', > ares: '1.7.5-DEV', > uv: '0.6', > openssl: '0.9.8r' }, > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
