(filePath: string)
| 162 | }); |
| 163 | |
| 164 | async function hashFile(filePath: string): Promise<string> { |
| 165 | const hash = createHash("sha1"); |
| 166 | |
| 167 | const stream = fs.createReadStream(filePath); |
| 168 | |
| 169 | for await (const chunk of stream) { |
| 170 | hash.update(chunk as Buffer); |
| 171 | } |
| 172 | |
| 173 | return hash.digest("hex"); |
| 174 | } |
no test coverage detected