First Draft of rtouch in Ruby

2009-03-08

Okay, here is the same thing, but in Ruby. Still no option-passing:

#!/usr/bin/ruby

require 'find'
require 'FileUtils'

dirs = (ARGV.length > 0 ? ARGV : ["."])

dirs.each do |dir|
  Find.find(dir) do |path|
    FileUtils.touch path
  end
end
blog comments powered by Disqus Prev: Improved pbcopy