- Dir
- glob
List directory tree
examples/filesystem/traverse_tree.cr
if ARGV.size != 1 puts "Needs path to directory" exit 1 end path = ARGV[0] dr = Dir.glob("#{path}/**/*") dr.each { |name| puts name }
if ARGV.size != 1 puts "Needs path to directory" exit 1 end path = ARGV[0] dr = Dir.glob("#{path}/**/*") dr.each { |name| puts name }