kaios-types
    Preparing search index...

    Interface DeviceStorage

    Provides access to the device's storage areas.

    Pref: "device.storage.enabled"

    interface DeviceStorage {
        canBeFormatted: boolean;
        canBeMounted: boolean;
        canBeShared: boolean;
        default: boolean;
        isRemovable: boolean;
        lowDiskSpace: boolean;
        onchange: ((this: DeviceStorage, ev: Event) => any) | null;
        storageName: string;
        add(aBlob: Blob | null): DOMRequest | null;
        addEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | AddEventListenerOptions,
        ): void;
        addNamed(aBlob: Blob | null, aName: string): DOMRequest | null;
        appendNamed(aBlob: Blob | null, aName: string): DOMRequest | null;
        available(): DOMRequest;
        delete(aName: string): DOMRequest;
        dispatchEvent(event: Event): boolean;
        enumerate(options?: DeviceStorageEnumerationParameters): DOMCursor;
        enumerate(
            path: string,
            options?: DeviceStorageEnumerationParameters,
        ): DOMCursor;
        enumerateEditable(options?: DeviceStorageEnumerationParameters): DOMCursor;
        enumerateEditable(
            path: string,
            options?: DeviceStorageEnumerationParameters,
        ): DOMCursor;
        format(): DOMRequest;
        freeSpace(): DOMRequest;
        get(aName: string): DOMRequest;
        getEditable(aName: string): DOMRequest;
        getRoot(): Promise<any>;
        mount(): DOMRequest;
        removeEventListener(
            type: string,
            callback: EventListenerOrEventListenerObject | null,
            options?: boolean | EventListenerOptions,
        ): void;
        storageStatus(): DOMRequest;
        unmount(): DOMRequest;
        usedSpace(): DOMRequest;
    }

    Hierarchy

    • EventTarget
      • DeviceStorage
    Index

    Properties

    canBeFormatted: boolean

    Whether the storage can be formatted.

    canBeMounted: boolean

    Whether the storage can be mounted.

    canBeShared: boolean

    Whether the storage can be shared.

    default: boolean

    Whether this is the default storage.

    isRemovable: boolean

    Whether the storage is removable.

    lowDiskSpace: boolean

    Whether the storage has low disk space.

    onchange: ((this: DeviceStorage, ev: Event) => any) | null

    Event handler for when the storage changes.

    storageName: string

    The name of the storage area.

    Methods

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • Adds a file to the storage with a specific name.

      Parameters

      • aBlob: Blob | null

        The content to add.

      • aName: string

        The name to give the file.

      Returns DOMRequest | null

      Error

    • Appends content to an existing file.

      Parameters

      • aBlob: Blob | null

        The content to append.

      • aName: string

        The name of the file to append to.

      Returns DOMRequest | null

      Error

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | EventListenerOptions

      Returns void