Get an array of recursive directory contents
Return an array containing all recursive files and directories under a given
directory, similar to Unix
find. Follows symlinks. Bare-bones, but
but adds trailing slashes to directories.
Not to be confused with node-walk, which has both an asynchronous and a synchronous API.
npm install --save walk-sync
var walkSync = require'walk-sync';var paths = walkSync'foo'
paths will be the following
'one.txt' 'subdir/' 'subdir/two.txt'
Note that directories come before their contents, and have a trailing slash.
Symlinks are followed.
walkSync(baseDir) is a faster substitute for
globsync'**'cwd: baseDirdot: truemark: truestrict: true