hyperdrive
hyperdrive copied to clipboard
"sync" event seems to fire before content is actually synced
Perhaps I'm misunderstanding how this is supposed to work. The sync event fires when I update the contents of the file, but the returned data from reading the file is still the old data...
archive.content.on("sync", function(){
archive.readFile('/data.json', 'utf-8', function (err, data) {
if (err) throw err
console.log(data)
})
})