Ruby Directory Access Example
Join the DZone community and get the full member experience.Join For Free
# directory access # list all files but .*/*~/*.o dirp = Dir.open(".") for f in dirp case f when /^\./, /~$/, /\.o/ # do not print else print f, "\n" end end dirp.close
Opinions expressed by DZone contributors are their own.