StorageManager
The StorageManager
interface of the Storage API provides an interface for managing persistence permissions and estimating available storage. Available only in secure contexts.
Functions
The estimate()
method of the StorageManager interface asks the Storage Manager for how much storage the current origin takes up (usage
), and how much space is available (quota
).
The estimate()
method of the StorageManager interface asks the Storage Manager for how much storage the current origin takes up (usage
), and how much space is available (quota
).
The getDirectory()
method of the StorageManager interface is used to obtain a reference to a FileSystemDirectoryHandle object allowing access to a directory and its contents, stored in the origin private file system (OPFS).
The getDirectory()
method of the StorageManager interface is used to obtain a reference to a FileSystemDirectoryHandle object allowing access to a directory and its contents, stored in the origin private file system (OPFS).
The persist()
method of the StorageManager interface requests permission to use persistent storage, and returns a Promise that resolves to true
if permission is granted and bucket mode is persistent, and false
otherwise.
The persist()
method of the StorageManager interface requests permission to use persistent storage, and returns a Promise that resolves to true
if permission is granted and bucket mode is persistent, and false
otherwise.
The persisted()
method of the StorageManager interface returns a Promise that resolves to true
if your site's storage bucket is persistent.
The persisted()
method of the StorageManager interface returns a Promise that resolves to true
if your site's storage bucket is persistent.