Hi there,
The following seems very odd to me (file doesn’t exist after I created
it!). Is there something I did wrong?
irb(main):056:0* File.open(’/tmp/test.txt’, ‘w’) { |f| f.write(‘hello’)
}
=> 5
irb(main):057:0> File.exist?(’/tmp/test.txt’)
=> true
irb(main):058:0> File.expand_path(’/tmp/test.txt’)
=> “D:/tmp/test.txt”
irb(main):059:0> File.exist?(‘D:/tmp/test.txt’)
=> false
irb(main):060:0> File.exist?(‘D:\tmp\test.txt’)
=> false
I am using WindowsXP, and
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java
HotSpot™ Client VM 1.6.0_16) [x86-java]
Thanks,
-Z