bunsenbrowser / bunsen

🔥 Bunsen Browser provides easy to use offline P2P application and file distribution that is verifiable on Android devices. https://bunsenbrowser.github.io/
117 stars 7 forks source link

DatArchive.load API #72

Closed rjcorwin closed 5 years ago

rjcorwin commented 5 years ago

This adds DatArchive.load API support. Unfortunately, this does not solve the issue I set out to solve with knowing whether or not you are the owner of an Archive. DatArchive.load does not return this, I think it's used as way to guarantees you have downloaded the entire Archive locally. For Bunsen's purposes, I'm not sure this provides any utility because in this PR we're getting the Archive on disk but when doing things like DatArchive.readFile, that happens from an Archive in memory on the server right?

Anyways, this does at least provide some API completeness so I think it's worth doing even if it doesn't have much practical benefit when just using it on Bunsen.