Closed ilyaigpetrov closed 6 years ago
Task: create an archive and write it to file.
'use strict'; const fs = require('fs'); const Hyperdrive = require('hyperdrive'); const archive = Hyperdrive('./'); // SIC! archive.writeFile('/hello.md', '# Hello _Markdown_!', (err) => { if (err) throw err; const outFile = fs.createWriteStream('out-archive.txt'); (archive.replicate()).pipe(outFile); });
Result:
/mnt/d/__Storage__/Workspace/repos/hyperarchives/node_modules/hyperdrive/index.js:891 return storage(path.join(folder, 'metadata', name)) ^ TypeError: storage is not a function
Task: create an archive and write it to file.
Result: