FileSystemDirectoryReader

非标
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

FileSystemDirectoryReader interface of the 文件和目录条目 API lets you access the FileEntry -based objects (generally FileSystemFileEntry or FileSystemDirectoryEntry ) representing each entry in a directory.

Because this is a non-standard API, whose specification is not currently on a standards track, it's important to keep in mind that not all browsers implement it, and those that do may implement only small portions of it. Check the 浏览器兼容性 section for details.

方法

readEntries()
Returns an array containing some number of the directory's entries. Each item in the array is an object based on FileSystemEntry —typically either FileSystemFileEntry or FileSystemDirectoryEntry .

规范

规范 状态 Comment
文件和目录条目 API 草案 提议 API 草案

此 API 没有正式的 W3C 或 WHATWG 规范。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
FileSystemDirectoryReader
弃用 非标
Chrome 8
Alternate Name
8
Alternate Name
Alternate Name Uses the non-standard name: DirectoryReader
Edge ≤18
Alternate Name
≤18
Alternate Name
Alternate Name Uses the non-standard name: WebKitDirectoryReader
Firefox 50 IE No Opera Yes
Prefixed
Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Safari 11.1 WebView Android ≤37
Alternate Name
≤37
Alternate Name
Alternate Name Uses the non-standard name: DirectoryReader
Chrome Android 18
Alternate Name
18
Alternate Name
Alternate Name Uses the non-standard name: DirectoryReader
Firefox Android 50 Opera Android No Safari iOS 11.3 Samsung Internet Android Yes
Prefixed
Yes
Prefixed
Prefixed Implemented with the vendor prefix: webkit
readEntries
弃用 非标
Chrome 8 Edge ? Firefox Yes IE No Opera ? Safari 11.1 WebView Android ≤37 Chrome Android 18 Firefox Android Yes Opera Android No Safari iOS 11.3 Samsung Internet Android ?

图例

完整支持
完整支持
不支持
不支持
兼容性未知
兼容性未知
非标。预期跨浏览器支持较差。
非标。预期跨浏览器支持较差。
弃用。不要用于新网站。
弃用。不要用于新网站。
使用非标名称。
要求使用供应商前缀或不同名称。
要求使用供应商前缀或不同名称。

另请参阅