1 2 3 4 5 6 7
# directory access # list all files but .*/*~/*.o Dir.foreach(".") do |file| unless file.start_with?('.') or file.end_with?('~', '.o') puts file end end