(leftPath, rightPath)
| 228 | } |
| 229 | |
| 230 | function filesEqualSha256(leftPath, rightPath) { |
| 231 | try { |
| 232 | const left = fs.statSync(leftPath); |
| 233 | const right = fs.statSync(rightPath); |
| 234 | return left.isFile() |
| 235 | && right.isFile() |
| 236 | && left.size === right.size |
| 237 | && fileSha256(leftPath) === fileSha256(rightPath); |
| 238 | } catch (_) { |
| 239 | return false; |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | function sleepSync(milliseconds) { |
| 244 | Atomics.wait(SLEEP_WORD, 0, 0, milliseconds); |