#!/usr/bin/env ruby # Copyright 2005 Daniel Cer (daniel.cer@cs.colorado.edu) # # This work is licensed under the Creative Commons Attribution-NonCommercial- # ShareAlike License. To view a copy of this license, visit # http://creativecommons.org/licenses/by-nc-sa/2.5/ or send a letter to # Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, # 94105, USA. if ARGV.length != 1: $stderr.puts "Usage:\n\t#{$0} (directory to list)\n" exit -1 end dir_path = ARGV[0] puts "Contents of \"#{dir_path}\":" Dir.foreach(dir_path) { | entry | puts "\t#{entry}" }