From: Daniel Berger Date: 2007-09-05T00:52:57+09:00 Subject: Re: Why does File.exists? not support regexp? It would be very handfull? On Sep 4, 9:45 am, kazaam wrote: > Hi, > if I wanna check if a file exists like fglrx.i386.8.40.3.ko why is File.exists? not able to handle regexp to check this like: > > system('rm fglrx*') if File.exists?(/^fglrx.+/) > > --> ./test.rb:4:in `exists?': can't convert Regexp into String (TypeError) Dir["fglrx*"].each{ |file| File.delete(file) } Regards, Dan