文件与目录条目 API

文件与目录条目(File and Directory Entries)API 模拟一个 web 应用可以导航和访问的本地文件系统。你可以在虚拟的沙箱文件系统中开发一个读、写、创建文件或者目录的应用。

访问文件系统

有两种方法可以访问当前规范草案中定义的文件系统:

接口

文件与目录条目 API 包含以下接口:

FileSystem

表示文件系统。

FileSystemEntry

表示文件系统中单个条目的基本接口。这是由表示文件或目录的其他接口实现的。

FileSystemFileEntry

表示文件系统中的单个文件。

FileSystemDirectoryEntry

表示文件系统中的单个目录。

FileSystemDirectoryReader

该接口通过调用 FileSystemDirectoryEntry.createReader() 创建,提供了允许读取目录内容的功能。

规范

Specification
File and Directory Entries API
# api-domfilesystem

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
FileSystem
name
root

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.

参见