project • https://github.com/mafintosh/fuse-bindings • Implement required filesystem operations • Run your node.js code and mount on an existing directory. • Success?!?!
(var i = 0; i < files.length; i++) { var buffer = files[i].data; var hash = hasha(buffer).substring(0, 12); files[i].name = `${hash}-${files[i].name}`; files[i].hasFingerprint = true; } } Let's rename the filename to be a hash!
is a WritableStream() var buffer = this.files[fileIndex].data.getContents(); zlib.gzip(buffer, function(error, result) { // create file if compression succeeded. }); } Like gzip?