[#3726] Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...>

Hi --

15 messages 2004/11/12
[#3749] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3751] Re: Fixnum#clone and Float#clone raise different exceptions — Yukihiro Matsumoto <matz@...> 2004/11/16

Hi,

[#3752] Re: Fixnum#clone and Float#clone raise different exceptions — "David A. Black" <dblack@...> 2004/11/16

Hi --

[#3785] The latest 1.8.2 cvs prints parse error when starting extension compiling — Yukihiro Matsumoto <matz@...>

Hi,

13 messages 2004/11/23
[#3787] Re: The latest 1.8.2 cvs prints parse error when starting extension compiling — Johan Holmberg <holmberg@...> 2004/11/23

Re: File.link on Win32

From: Tim Sutherland <timsuth@...>
Date: 2004-11-12 21:07:44 UTC
List: ruby-core #3724
On Sat, Nov 13, 2004 at 02:08:04AM +0900, Berger, Daniel wrote:
> Hi all,
> 
> I noticed that win32.c in 1.8.2 p3 contained a link() function (or maybe
> it was always there and I never noticed).  Anyway, it doesn't seem to
> work properly.
> 
> File.link("C:\\temp.txt","C:\\temp.lnk")
> 
> It creates a shortcut, but it's busted.  Double clicking on the shortcut
> does nothing.  If I right click on the shortcut in Windows Explorer and
> select the "shortcut" tab it says, "This is not a valid shortcut".
> 
> Any ideas?

File.link uses CreateHardLinkA which creates a "hard link" (using
inodes) rather than a shortcut.

Try doing
 File.link("C:\\temp.txt","C:\\temp2.txt")
and then reading the "temp2.txt" file.

This will only work on NTFS I think.

It's like using the `ln' program on a unix system.

In This Thread

Prev Next