File System Access API 浏览器支持
发布于
File System Access API 让页面在用户经过选择器和授权步骤之后读写设备上的文件,入口是 showOpenFilePicker()、showSaveFilePicker() 与 showDirectoryPicker()。
下表覆盖这些用户可见的选择器方法。Firefox 与 Safari 实现了不带选择器的源私有文件系统(OPFS),各行脚注有说明,但状态列衡量的不是 OPFS。
- 图例
- 支持
- 部分支持
- 需开启标志
- 不支持
- 未知
| 浏览器 / 平台 | 支持 | 版本 | 置信度 | 来源 | 备注 |
|---|---|---|---|---|---|
| Chrome (Android) | 不支持 | — | 中 | 来源 | 1 |
| Chrome (Desktop) | 支持 | 86 | 中 | 来源 | — |
| Edge (Desktop) | 支持 | 86 | 中 | 来源 | — |
| Safari (iOS) | 不支持 | — | 中 | 来源 | 2 |
| Safari (macOS) | 不支持 | — | 中 | 来源 | 3 |
| Firefox (Desktop) | 不支持 | — | 中 | 来源 | 4 |
| Samsung Internet | 不支持 | — | 中 | 来源 | 5 |
- Android 上不暴露 showOpenFilePicker / showSaveFilePicker。
- 仅提供源私有文件系统(OPFS),没有用户可见的文件选择器。
- 没有 showOpenFilePicker;仅 OPFS。
- 仅 OPFS;无法访问用户可见的文件选择器。
- 选择器方法(`showOpenFilePicker`、`showSaveFilePicker`、`showDirectoryPicker`)在 Chromium 中仅限桌面端;Chrome for Android 没有实现,Samsung Internet 也就无从镜像(MDN 兼容性表,2026-10-03 核对)。
- File System Access API:读写本地文件
- File System Access(wicg.github.io)
- File System API(developer.mozilla.org)