[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

FileUtils.ln_s in Vista

Fernando Cacciola

10/31/2007 3:38:00 PM

8 Answers

gga

10/31/2007 8:44:00 PM

0

Fernando Cacciola 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.

Laurent Sansonetti

10/31/2007 10:13:00 PM

0

On Oct 31, 2007 9:58 PM, gga <GGarramuno@aol.com> wrote:
> Fernando Cacciola 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

MC

11/3/2007 3:15:00 PM

0

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


Fernando Cacciola

11/5/2007 4:58:00 PM

0

Laurent Sansonetti wrote:
> On Oct 31, 2007 9:58 PM, gga <GGarramuno@aol.com> wrote:
>> Fernando Cacciola 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/
>
OK

Thanks


--
Fernando Cacciola
SciSoft
http://fcacciola....


Fernando Cacciola

11/5/2007 5:02:00 PM

0

gga wrote:
> Fernando Cacciola 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 Cacciola
SciSoft
http://fcacciola....



Fernando Cacciola

11/5/2007 5:04:00 PM

0

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.


--
Fernando Cacciola
SciSoft
http://fcacciola....





mortee

11/5/2007 6:36:00 PM

0

Fernando Cacciola wrote:
> gga wrote:
>> Fernando Cacciola 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


Nobuyoshi Nakada

11/6/2007 12:52:00 PM

0

Hi,

At Thu, 1 Nov 2007 05:58:24 +0900,
gga wrote in [ruby-talk:276964]:
> Fernando Cacciola 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).

--
Nobu Nakada