MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / scanDirectory

Function scanDirectory

scripts/compress.js:115–131  ·  view source on GitHub ↗
(dir)

Source from the content-addressed store, hash-verified

113 const results = [];
114
115 async function scanDirectory(dir) {
116 const files = fs.readdirSync(dir);
117
118 for (const file of files) {
119 const fullPath = path.join(dir, file);
120 const stat = fs.statSync(fullPath);
121
122 if (stat.isDirectory()) {
123 await scanDirectory(fullPath);
124 } else if (stat.isFile()) {
125 const result = await compressFile(fullPath);
126 if (result) {
127 results.push(result);
128 }
129 }
130 }
131 }
132
133 await scanDirectory(dirPath);
134 return results;

Callers 1

compressDirectoryFunction · 0.85

Calls 1

compressFileFunction · 0.85

Tested by

no test coverage detected