Hacker News new | ask | show | jobs
by iansinnott 980 days ago
What are the limitations of OPFS not being a real file system?

100% agree that the file system API ergonomics make it unusable as the storage layer for a local-first application. OPFS seems promising though, which is why I ask the above.

2 comments

As the sibling comment by eternityforest says, OPFS does not create real files on your file system. It is backed by sqlite or some other embedded key value store.

So, if you want to backup your webapp data, you cannot use any filesystem backup tool.

And since OPFS cannot access your local files you cannot use it for webapps that largely use local file system data.

Something like scoped storage would have been great. Each webapp gets a separate directory where they can store your data. Easy to backup and you can also drop any local files or directory in there with existing OS tools.

Thanks for elaborating, that makes sense.

Historically WebSQL would drop a real live SQLite database onto the disk (in some application support directory for the browser) which was very convenient for exactly this use case.

It's unfortunate that's no longer the case.

Lack of accessibility outside the app. It's harder to back up or make external tools that integrate.