Dir Iterate Recursive
Recursively walk a directory and execute a function on each file. The function must either be synchronous or return a promise.
var iterate = var fs =
API
iterate(directory, fn)
directory
must be the absolute path of the directory.
fn
must either be synchronous or return a promise.
fn
is called with fn(file, stats)
where file
is the the absolute path of the file and stats
is the fs.stats()
object.