MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / listFiles

Function listFiles

tools/conversion.js:266–281  ·  view source on GitHub ↗
(dir, filelist)

Source from the content-addressed store, hash-verified

264});
265
266function listFiles (dir, filelist) {
267 const files = fs.readdirSync(dir);
268 filelist = filelist || [];
269 files.forEach(function (file) {
270 if (file === 'node_modules') {
271 return;
272 }
273
274 if (fs.statSync(path.join(dir, file)).isDirectory()) {
275 filelist = listFiles(path.join(dir, file), filelist);
276 } else {
277 filelist.push(path.join(dir, file));
278 }
279 });
280 return filelist;
281}
282
283function convert (content, operations) {
284 for (let i = 0; i < operations.length; i++) {

Callers 1

conversion.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected