FileSystemDirectoryHandle.entries()
Baseline 2023Newly available
Since March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
FileSystemDirectoryHandle
インターフェイスの entries()
メソッドは、for...in
が提供するのと同じ順序でオブジェクト自身の列挙可能なプロパティの [key, value]
ペアの配列を返します。(違いは、for-in ループはプロトタイプチェーン内のプロパティも列挙することです)
構文
js
entries()
引数
なし
返値
FileSystemDirectoryHandle
オブジェクト自身の列挙可能なプロパティの [key, value]
ペアの配列を返します。
例
js
const dirHandle = await window.showDirectoryPicker();
for await (const [key, value] of dirHandle.entries()) {
console.log({ key, value });
}
仕様書
Specification |
---|
File System # api-filesystemdirectoryhandle-asynciterable |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
entries |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.