Hard Links
Scott Palmer
swpalmer at gmail.com
Fri May 13 07:28:49 PDT 2011
I see that a method to create a hard link is available in NIO.2. But where is the method to get the current link count?
It was mentioned back in 2008 here http://openjdk.java.net/projects/nio/presentations/TS-5686.pdf
But I see a lot has changed since then.. the entire FileRef class is gone. it seems to have been replaced with the Files class, where I see createLink(Path, Path) but no linkCount()
There are many cases where you would want to break hard links when you need to make changes to a file (some sort of copy-on-write semantics), but you can't code it if you don't know if the file is linked. I see the isSymbolicLink method, but nothing similar for hard links.
Scott
More information about the nio-discuss
mailing list