Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: c38b1cca24
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (15 sloc) 0.351 kB
fs = require 'fs'
walk = (dir, f_match, f_visit) ->
_walk = (dir) ->
fns = fs.readdirSync dir
for fn in fns
fn = dir + '/' + fn
if f_match fn
f_visit fn
if fs.statSync(fn).isDirectory()
_walk fn
_walk(dir)
dir = '..'
matcher = (fn) -> fn.match /\.coffee/
action = console.log
walk dir, matcher, action
Jump to Line
Something went wrong with that request. Please try again.