FileUtils.ln_s in Vista

I just found out that Windows Vista supports symbolic links. In fact, it
has
a new command line tool “mklink” for that.
However, 1.8.6 says that the functionality is not supported.

So,

1.Is there a more recent version that support true symlinks in Vista?

2.If not, how do I detect the host platform so I can call Vista’s own
mklink instead?

TIA

Fernando C.

Fernando C. wrote:

I just found out that Windows Vista supports symbolic links.

Contrary to Microsoft propaganda that says this feature was modeled
identical to Unix, Vista still does not support true symlinks. Their
current implementation suffers from:

  • being limited to a max of 31 symlinks per directory.
  • relative symlinks cannot cross volumes.
  • mklink forces you to distinguish between a file or directory.
  • other pre-vista windows versions on a network cannot see the
    symlinks (unlike Samba).
  • NTFS only, not available on FAT.

2.If not, how do I detect the host platform so I can call Vista’s own
mklink instead?

RUBY_PLATFORM =~ /win/

further check on OS version requires platform specific code or
checking the version of cmd.exe or similar. Sys::Admin may give you a
more friendly way to do this.

On Oct 31, 2007 9:58 PM, gga [email protected] wrote:

Fernando C. wrote:

2.If not, how do I detect the host platform so I can call Vista’s own
mklink instead?

RUBY_PLATFORM =~ /win/

This is not going to work as expected on Mac OS X environments (which
have a RUBY_PLATFORM that contains “darwin”).

The following would perhaps be better: RUBY_PLATFORM =~
/mswin32|cygwin|mingw|bccwin/

Laurent

Laurent S. wrote:

The following would perhaps be better: RUBY_PLATFORM =~
/mswin32|cygwin|mingw|bccwin/

OK

Thanks

Hi!

I just found out that Windows Vista supports symbolic links.

Junction points (for files) & hardlinks (for dir) exists on Vista, on
XP, on Win-2000…


@-salutations

Michel Claveau

gga wrote:

Fernando C. wrote:

I just found out that Windows Vista supports symbolic links.

Contrary to Microsoft propaganda that says this feature was modeled
identical to Unix, Vista still does not support true symlinks. Their
current implementation suffers from:

  • being limited to a max of 31 symlinks per directory.

Grrrrr, how useless.

  • relative symlinks cannot cross volumes.
  • mklink forces you to distinguish between a file or directory.
  • other pre-vista windows versions on a network cannot see the
    symlinks (unlike Samba).
  • NTFS only, not available on FAT.

The above are not a problem in my specific case… but the 31 cap is a
showstopper.

2.If not, how do I detect the host platform so I can call Vista’s
own mklink instead?

RUBY_PLATFORM =~ /win/

OK

further check on OS version requires platform specific code or
checking the version of cmd.exe or similar. Sys::Admin may give you a
more friendly way to do this.

I will have to resort to hardinks for Windoze so I won’t have to
distinguish
them.
Thans for the tip though.

Thanks

Fernando C. wrote:

gga wrote:

Fernando C. wrote:

2.If not, how do I detect the host platform so I can call Vista’s
own mklink instead?

RUBY_PLATFORM =~ /win/

OK

It was just pointed out that

“darwin” =~ /win/

mortee

MC wrote:

Hi!

I just found out that Windows Vista supports symbolic links.

Junction points (for files) & hardlinks (for dir)

It’s Junction for directories and hardlinks for files (the opposite).

exists on Vista, on
XP, on Win-2000…

Ya, but I was referring to symlinks, not hardlinks.

Hi,

At Thu, 1 Nov 2007 05:58:24 +0900,
gga wrote in [ruby-talk:276964]:

Fernando C. wrote:

I just found out that Windows Vista supports symbolic links.

Contrary to Microsoft propaganda that says this feature was modeled
identical to Unix, Vista still does not support true symlinks. Their
current implementation suffers from:

  • being limited to a max of 31 symlinks per directory.

Is this true? I tried it and successed creating 70 symlinks
(just interrupted then).