MCPcopy Create free account
hub / github.com/mscdex/ssh2 / startReads

Function startReads

lib/protocol/SFTP.js:2376–2387  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2374 }
2375
2376 function startReads() {
2377 let reads = 0;
2378 let psrc = 0;
2379 while (pdst < fsize && reads < concurrency) {
2380 const chunk =
2381 (pdst + chunkSize > fsize ? fsize - pdst : chunkSize);
2382 singleRead(psrc, pdst, chunk);
2383 psrc += chunk;
2384 pdst += chunk;
2385 ++reads;
2386 }
2387 }
2388 });
2389 }
2390 });

Callers 1

tryStatFunction · 0.85

Calls 1

singleReadFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…