MCPcopy
hub / github.com/flowjs/flow.js / testChunkExists

Function testChunkExists

samples/Node.js/flow-node.js:117–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115 var currentTestChunk = 1;
116 var numberOfChunks = Math.max(Math.floor(totalSize / (chunkSize * 1.0)), 1);
117 var testChunkExists = function() {
118 fs.exists(getChunkFilename(currentTestChunk, identifier), function(exists) {
119 if (exists) {
120 currentTestChunk++;
121 if (currentTestChunk > numberOfChunks) {
122 callback('done', filename, original_filename, identifier);
123 } else {
124 // Recursion
125 testChunkExists();
126 }
127 } else {
128 callback('partly_done', filename, original_filename, identifier);
129 }
130 });
131 };
132 testChunkExists();
133 });
134 } else {

Callers 1

flow-node.jsFile · 0.85

Calls 1

getChunkFilenameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…