StorageBucketManager Class
The storage buckets of the origin of a window or a worker (https://wicg.github.io/storage-buckets/#storagebucketmanager, Navigator.StorageBuckets): named buckets whose IndexedDB databases, caches and origin private file system are kept apart from the ones of the origin (its default bucket) and of the other buckets, and are removed with the bucket. The buckets of an origin are shared by the windows and the workers of a browsing context group (in the partition of the storage key of the environment).
public sealed class StorageBucketManagerMethods
| Name | Description |
|---|---|
| Delete(string) | Deletes a bucket and its storage (https://wicg.github.io/storage-buckets/#dom-storagebucketmanager-delete): its databases, its caches and its file system. The StorageBucket objects of the bucket then fail with an UnknownError. Deleting a bucket that does not exist does nothing. The task fails as StorageBucketManager.Open's. |
| Keys() | Returns the names of the buckets of the origin, in lexicographic order (https://wicg.github.io/storage-buckets/#dom-storagebucketmanager-keys). The task fails as StorageBucketManager.Open's. |
| Open(string, StorageBucketOptions?) | Opens a bucket, created if needed (https://wicg.github.io/storage-buckets/#dom-storagebucketmanager-open). The name starts with a lowercase ASCII letter or a digit, and has at most 64 lowercase ASCII letters, digits, - and _. The options are used when the bucket is created; an expired bucket is replaced by a new one. The task fails with a TypeErrorException when the name or the quota is invalid or the document is not fully active, and with a SecurityError DomException when the origin is opaque. |
Delete(string)
StorageBuckets.csDeletes a bucket and its storage (https://wicg.github.io/storage-buckets/#dom-storagebucketmanager-delete): its databases, its caches and its file system. The StorageBucket objects of the bucket then fail with an UnknownError. Deleting a bucket that does not exist does nothing. The task fails as StorageBucketManager.Open's.
Keys()
StorageBuckets.csReturns the names of the buckets of the origin, in lexicographic order (https://wicg.github.io/storage-buckets/#dom-storagebucketmanager-keys). The task fails as StorageBucketManager.Open's.
public Task<IReadOnlyList<string>> Keys()Open(string, StorageBucketOptions?)
StorageBuckets.csOpens a bucket, created if needed (https://wicg.github.io/storage-buckets/#dom-storagebucketmanager-open). The name starts with a lowercase ASCII letter or a digit, and has at most 64 lowercase ASCII letters, digits, - and _. The options are used when the bucket is created; an expired bucket is replaced by a new one. The task fails with a TypeErrorException when the name or the quota is invalid or the document is not fully active, and with a SecurityError DomException when the origin is opaque.
public Task<StorageBucket> Open(string name, StorageBucketOptions? options = null)Parameters
namestring- The name of the bucket.
optionsStorageBucketOptions?- The options of a new bucket.