dir.rb [email protected]
5 6 7 8 9 10 11
# File 'lib/rcl/ext/dir.rb', line 5 def self.ls dir, glob = File.join('**','**'), &block ret = [] unless block Dir.glob(File.join(dir, glob)) do |entry| block ? block.call(entry) : ret.push(entry) end ret end