(fs, stat, cwd, ignore, entries, sort)
| 45839 | } |
| 45840 | |
| 45841 | var statAll = function (fs, stat, cwd, ignore, entries, sort) { |
| 45842 | var queue = entries || ['.'] |
| 45843 | |
| 45844 | return function loop (callback) { |
| 45845 | if (!queue.length) return callback() |
| 45846 | var next = queue.shift() |
| 45847 | var nextAbs = path.join(cwd, next) |
| 45848 | |
| 45849 | stat(nextAbs, function (err, stat) { |
| 45850 | if (err) return callback(err) |
| 45851 | |
| 45852 | if (!stat.isDirectory()) return callback(null, next, stat) |
| 45853 | |
| 45854 | fs.readdir(nextAbs, function (err, files) { |
| 45855 | if (err) return callback(err) |
| 45856 | |
| 45857 | if (sort) files.sort() |
| 45858 | for (var i = 0; i < files.length; i++) { |
| 45859 | if (!ignore(path.join(cwd, next, files[i]))) queue.push(path.join(next, files[i])) |
| 45860 | } |
| 45861 | |
| 45862 | callback(null, next, stat) |
| 45863 | }) |
| 45864 | }) |
| 45865 | } |
| 45866 | } |
| 45867 | |
| 45868 | var strip = function (map, level) { |
| 45869 | return function (header) { |
no test coverage detected