From: Michael Weller Date: 2004-10-08T01:30:38+09:00 Subject: Sth. wrong with File.file? (or with me) Hi! I wrote this code to walk a file tree from a given starting directory: def each_dir(start_dir, &action) files = Dir.new(start_dir).to_a[2..-1] #remove . and .. files.each do |f| unless File.file? f then yield f each_dir(start_dir << "\\" << f, &action) end end end But this doesn't work properly because it seems like File.file? sometimes errs... I know RTFS ;-) but I couldn't find it :-(( Can someone guide me? Michael