d = Dir.open('mydir')d.reject { |f| f[0] == '.' }d.entries.size # => 0d.rewindd.entries.size # => 6d.close