On Wed, 21 Nov 2001, Ben Schumacher wrote:

> I was wondering if somebody had an easy way of checking if a file exists on
> a filesystem without using begin/rescue. I might be making this too
> complicated on myself, but I can't seem to find any other way. I was hopign
> there was something like a "File.exists" or similar.

File.exists? maybe?

irb(main):001:0> File.exists?('/vmlinuz')
false
irb(main):002:0> File.exists?('/boot/vmlinuz')
true

Hope this helps,

Mike

-- 
mike / stok.co.uk                    |           The "`Stok' disclaimers" apply.
http://www.stok.co.uk/~mike/       | GPG PGP Key      1024D/059913DA
mike / starnix.com                   | Fingerprint      0570 71CD 6790 7C28 3D60
http://www.starnix.com/            |                  75D2 9EC4 C1C0 0599 13DA