FileSystemHandle.isSameEntry()

Baseline 2023
Newly 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) でのみ利用できます。

FileSystemHandle インターフェイスの isSameEntry() メソッドは、2 個のハンドルを比較し、対応するエントリー (ファイルまたはディレクトリー) が一致するかを確認します。

構文

js
isSameEntry(fileSystemHandle)

引数

FileSystemHandle

メソッドを呼び出すハンドルと比較する FileSystemHandle です。

返値

エントリーが一致するとき true となる Boolean を返します。

例外

例外は投げられません。

以下の関数は、1 個のエントリーをエントリーの配列と比較し、一致するエントリーを全て取り除いた新しい配列を返します。

js
function removeMatches(fileEntry, entriesArr) {
  let newArr = entriesArr.filter((entry) => !fileEntry.isSameEntry(entry));

  return newArr;
}

仕様書

Specification
File System
# api-filesystemhandle-issameentry

ブラウザーの互換性

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
isSameEntry

Legend

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

Full support
Full support
No support
No support

関連情報