Function
waitForFile
(stream: GridFSBucketReadStream, callback: Callback)
Source from the content-addressed store, hash-verified
| 413 | } |
| 414 | |
| 415 | function waitForFile(stream: GridFSBucketReadStream, callback: Callback): void { |
| 416 | if (stream.s.file) { |
| 417 | return callback(); |
| 418 | } |
| 419 | |
| 420 | if (!stream.s.init) { |
| 421 | init(stream); |
| 422 | stream.s.init = true; |
| 423 | } |
| 424 | |
| 425 | stream.once('file', () => { |
| 426 | callback(); |
| 427 | }); |
| 428 | } |
| 429 | |
| 430 | function handleStartOption( |
| 431 | stream: GridFSBucketReadStream, |
Tested by
no test coverage detected