(dir: string, out: string[])
| 31 | } |
| 32 | |
| 33 | async function walk(dir: string, out: string[]): Promise<void> { |
| 34 | if (!fs.existsSync(dir)) return; |
| 35 | for (const entry of await fs.promises.readdir(dir, { withFileTypes: true })) { |
| 36 | const full = path.join(dir, entry.name); |
| 37 | if (entry.isDirectory()) { |
| 38 | await walk(full, out); |
| 39 | } else if (entry.isFile() && entry.name.toLowerCase().endsWith(".png")) { |
| 40 | out.push(full); |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | async function hasEmbeddedManifest(buffer: Buffer, mimeType: string): Promise<boolean> { |
| 46 | try { |