Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【开源自荐】在浏览器中运行的简单、高性能、完备的文件系统 API #4099

Open
hughfenghen opened this issue Mar 6, 2024 · 0 comments
Labels

Comments

@hughfenghen
Copy link

项目链接

  • opfs-tools:在浏览器中运行的简单、高性能、完备的文件系统 API
  • opfs-tools-explorer:管理 Web 站点的 OPFS 文件,类似操作系统的 Explorer、Finder

推文链接

推文内容

文件系统是许多领域程序的基石,所有通用编程语言都会内置完备的文件系统 API。

Web 很长一段时间没有提供完善的访问文件系统的规范,使得需要高频读写文件、大文件处理软件在 Web 端都会受到一些限制,比如音视频剪辑、游戏、数据库等等。

之前在浏览器中实现视频裁剪截帧等相关功能时,发现缺少基本的操作文件的 API,比如读写、移动、复制文件。

OPFS已经发布很久了(Chrome 86),它提供了访问文件系统的低级 API,且在 Worker 中访问才能发挥最佳性能,日常使用起来很是麻烦,于是就有了基于 OPFS 封装简单易用 API 的想法。

以上两个项目就是笔者近期的成果,点击体验 opfs-tools-explorer demo
image

后续会再写一篇文章详细介绍 Web 中与文件相关的 API 和 opfs-tools 实现原理。

如果读者也有在浏览器中访问文件系统的诉求,欢迎 Star 和贡献,还可订阅博客以接收更新。

@ruanyf ruanyf added the weekly label Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants