From: Pablo Lorenzzoni Date: 2002-06-20T05:46:02+09:00 Subject: Re: Newbie question Hello, I am also a newbie, but I think you're in the wrong path. According to the Pragmatic Programmers Guide you should be using FileTest module. They sugest: FileTest.exist?('filename') I believe File class import FileTest automatically. If this is true, File.exist?('filename') should work as well. (I haven't tested it, though) []s Pablo Em Qua 19 Jun 2002 17:26, Steve Merrick escreveu: | My first Ruby program is an equivalent of the MS-DOS 'dir' command - | just for learning purposes, you understand! ;-) | | I can't seem to find the method that will tell me whether or not a file | exists. File.stat("filename").file? (and similar methods) throw a system | error if the file doesn't exist. | | Help a newbie out? TIA. :-) -- Pablo Lorenzzoni (Spectra) GnuPG Key ID 268A084D at search.keyserver.net Webpage: http://people.debian.org/~spectra/