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

Function pipeChunkRm

samples/Node.js/flow-node.js:184–205  ·  view source on GitHub ↗
(number)

Source from the content-addressed store, hash-verified

182
183 // Iterate over each chunk
184 var pipeChunkRm = function(number) {
185
186 var chunkFilename = getChunkFilename(number, identifier);
187
188 //console.log('removing pipeChunkRm ', number, 'chunkFilename', chunkFilename);
189 fs.exists(chunkFilename, function(exists) {
190 if (exists) {
191
192 console.log('exist removing ', chunkFilename);
193 fs.unlink(chunkFilename, function(err) {
194 if (err && options.onError) options.onError(err);
195 });
196
197 pipeChunkRm(number + 1);
198
199 } else {
200
201 if (options.onDone) options.onDone();
202
203 }
204 });
205 };
206 pipeChunkRm(1);
207 };
208

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…