hyperdrive icon indicating copy to clipboard operation
hyperdrive copied to clipboard

"sync" event seems to fire before content is actually synced

Open wolkenmachine opened this issue 7 years ago • 0 comments

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)
   })
})

wolkenmachine avatar May 17 '18 12:05 wolkenmachine