View Problem

Process each file in a directory recursively

DiskEdit
ruby
def procdir(dirname)
Dir.foreach(dirname) do |dir|
dirpath = dirname + '/' + dir
if File.directory?(dirpath) then
if dir != '.' && dir != '..' then
puts "DIRECTORY: #{dirpath}" ; procdir(dirpath)
end
else
puts "FILE: #{dirpath}"
end
end
end

# ------

procdir('/tmp')
ExpandDiskEdit
fantom
File(`./`).walk { process(it) }

Submit a new solution for ruby, csharp, or fantom
There are 14 other solutions in additional languages (clojure, cpp, erlang, fsharp ...)