[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: File::Separator on win32

Alex Young

7/24/2006 4:29:00 PM

Michael Siebert wrote:
> Hello Folks,
>
> on my win32 machine, File::Separator returns / instead of a \.
> this confuses the system so that it cant find the files i need.
> is there a way round? is this a bug or wanted behaviour?
>
It shouldn't be a problem - Windows uses / and \ pretty much
interchangeably for most things. What's the code that's giving you
problems?

--
Alex

1 Answer

Brian Hartin

5/23/2008 5:51:00 PM

0

Michael Siebert wrote:
> FileUtils::cp says ENOENT and thats not good. the path is exactly right
> but
> with /'es
>
> 2006/7/24, Alex Young <alex@blackkettle.org>:
>> problems?
>>
>> --
>> Alex
>>
>>
>
>
> --
> Michael Siebert <info@siebert-wd.de>
>
> www.stellar-legends.de - Weltraum-Browsergame im Alpha-Stadium

`md #{File.join("c:","foo")}` fails as well. STDERR contains 'The
syntax of the command is incorrect'.

In other languages, like Java, the path separator constant/method is
used to abstract the knowledge of which operating system is in play.
Can it not be so in Ruby?
--
Posted via http://www.ruby-....