MCPcopy Create free account
hub / github.com/pillarjs/multiparty / cleanupOpenFiles

Function cleanupOpenFiles

index.js:628–639  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

626}
627
628function cleanupOpenFiles(self) {
629 self.openedFiles.forEach(function(internalFile) {
630 // since fd slicer autoClose is true, destroying the only write stream
631 // is guaranteed by the API to close the fd
632 internalFile.ws.destroy();
633
634 fs.unlink(internalFile.publicFile.path, function(err) {
635 if (err) self.handleError(err);
636 });
637 });
638 self.openedFiles = [];
639}
640
641function holdEmitQueue(self, eventEmitter) {
642 var item = { cb: null, ee: eventEmitter, err: null }

Callers 1

handleErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…