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

Specification
File System Access
# api-filesystemhandle-issameentry

Browser compatibility

BCD tables only load in the browser

See also