(filePath: string)
| 269 | } |
| 270 | |
| 271 | async function computeFileHash(filePath: string): Promise<string> { |
| 272 | const hash = crypto.createHash(RESUMABLE_UPLOAD_HASH_ALGORITHM); |
| 273 | await pipeline(fs.createReadStream(filePath), async function* (source) { |
| 274 | for await (const chunk of source) { |
| 275 | hash.update(chunk); |
| 276 | yield chunk; |
| 277 | } |
| 278 | }); |
| 279 | return hash.digest('hex'); |
| 280 | } |
no test coverage detected
searching dependent graphs…