IDBFileHandle.getMetadata()

Non-standard: 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.

The getMetadata() method of the IDBFileHandle allows retrieving some metadata about the file.

Note: The three interfaces IDBMutableFile, IDBFileHandle, and IDBFileRequest are deprecated and only implemented for backward compatibility in Firefox. Do not use them anymore: consider using the File and Directory Entries API instead.

Syntax

getMetaData()
getMetaData(options)

Parameters

options Optional

An object used to request specific metadata. Each key is a boolean where true means the metadata is expected and where false means it is not expected. Note that if the key is undefined, it is considered as if it were true.

The following metadata are supported:

size

The size of the file.

lastModified

The Date when the file was last modified.

Return value

An IDBFileRequest object. In case of success, the request's result is an object with the metadata requested through the param object.

Specifications

This feature is not part of any current specification. It is no longer on track to become a standard.

Browser compatibility

No compatibility data found for api.IDBFileHandle.getMetadata.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.

See also