FileSystemHandle.isSameEntry()

Draft: This page is not complete.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The isSameEntry() method of the FileSystemHandle interface compares two handles to see if the associated entries (either a file or directory) match.

Syntax

var Boolean = FileSystemHandle1.isSameEntry(FileSystemHandle2);

Parameters

FileSystemHandle

The FileSystemHandle to match against the handle on which the method is invoked.

Return value

Returns a Boolean which is true is the entries match.

Exceptions

No exceptions are thrown.

Examples

The following function compares a single entry with an array of entries, and returns a new array with any matching entries removed.

function removeMatches(fileEntry, entriesArr) {

  let newArr = entriesArr.filter( entry => !fileEntry.isSameEntry(entry) )

  return newArr;
}

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
isSameEntry
86
86
No
No
72
No
No
86
No
No
No
14.0

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle/isSameEntry