Forum: JRuby FileUtils.link and Windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Zachary Brown (Guest)
on 2009-02-27 00:27
(Received via mailing list)
Hi all,

Recently a bug was filed (JRUBY-3440) that exposed the fact that
FileUtils.link is not implemented on Windows.

Currently, Windows versions besides Vista have no implementation of
symlinks. They have hard links but the semantics of these hard links
are not attractive as they are dangerous to use with Win Explorer.
There's plenty of useful information about this floating about the
tubes so I won't weigh this thread down with it. Suffice it to say its
not a good mapping from Windows hard links to POSIX hard links.

Now my question for all the JRuby users (more specifically the Vista
users), would any of you greatly benefit by me putting in some effort
to properly setup symlinks for Vista systems on JRuby? That is
FileUtils.link would create a symlink on Vista systems.

Thoughts, feedback?

-Zac

Thanks to Slava Pestov for giving me a good run down on why we
shouldn't try to map Windows hard-linking to POSIX-style linking.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Jochen T. (Guest)
on 2009-02-27 13:50
(Received via mailing list)
Zachary Brown schrieb:
[...]
> Now my question for all the JRuby users (more specifically the Vista
> users), would any of you greatly benefit by me putting in some effort to
> properly setup symlinks for Vista systems on JRuby? That is
> FileUtils.link would create a symlink on Vista systems.

I am not really a JRuby user, but if you can do something equal to a
POSIX symlink for Vista, then I sure would be interested in seeing how
it works.

bye blackdrag

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Zachary Brown (Guest)
on 2009-02-27 14:34
(Received via mailing list)
Hi,

Well I am by no means doing any sort of black magic with NTFS et
al. :). Its actually a new API call they've added to the NT6.0 line.
It would more just be me mapping it to link via JNA.

The big thing is I would have to add in the checking of windows
versions and so on so that the call isn't noted as 'unimplemented' on
anything but Vista (& now Win 7).

Like I said, if there's enough interest, I'll go ahead and do it. I
have most of the foot work done already from a half baked attempt to
add hard-linking on Windows... and thats a bad bad thing :|.

-Zac


On Feb 27, 2009, at 6:50 AM, Jochen T. wrote:

>
>
>   http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.