Support for hardlinks in Windows XP?

Alan Bateman Alan.Bateman at Sun.COM
Mon Jul 14 04:46:50 PDT 2008


Rajendra Gutupalli wrote:
> Hi Alan,
>
> I have one query, just now I came to know a command in Windows XP 
> 'fsutil hardlink create new_file existing_file' using which I am able 
> to create a hard link
> in Windows XP but Path.createLink() throws UOE. So my query is when 
> Windows XP supports creation of hard links why Path.createLink() fails 
> with UOE??
It's an oversight in the implementation. All the sym link methods throw 
UOE on Windows editions older than Vista and that check shouldn't be in 
the createLink method. Thanks for finding this.

BTW: If you are testing with hard links then do you mind checking this 
method on Vista 64-bit or Windows Server 2008 64-bit. In particular, the 
case where the user doesn't have sufficient rights. It should throw an 
I/O exception indicating that the user doesn't sufficient rights. I've 
noticed on at least two machines that it fails silently which suggests 
this is a bug we need to forward to Microsoft (32-bit is okay).

-Alan.



More information about the nio-dev mailing list