DeviceStorage

Tags: 1.0 2.0 2.5 Privileged

Summary

The DeviceStorage interface is used to access files on a specific storage area available on the device. A storage area is, in essence, a file system repository even if it hides the reality of the underlying file system.

To access a storage area, you must use the navigator.getDeviceStorage() method, which returns DeviceStorage objects. You then use those objects' methods and properties to access the content of the storage area.

Properties

  • DeviceStorage.canBeMounted
    Indicates if the storage area denoted by storageName is capable of being mounted and unmounted.

  • DeviceStorage.canBeFormatted
    Indicates if the storage area denoted by storageName is capable of being formatted.

  • DeviceStorage.default
    A Boolean value that indicates if this storage area is the default destination for storing new files (true) or not (false). Determines if this storage area is the one which will be used by default for storing new files.

  • DeviceStorage.isRemovable
    Indicates if the storage area denoted by storageName is removable

  • DeviceStorage.lowDiskSpace
    A Boolean value that returns true if this storage area is close to being full.

  • DeviceStorage.storageName
    A string representing the name of the storage area.

  • DeviceStorage.storagePath
    Return the mounted name of volume device

Event handlers

  • DeviceStorage.onchange
    A handler for the change event. This event occurs each time the storage area is updated.

Methods

Event handlers

Methods inherited from the EventTarget interface:

Additional methods for Mozilla chrome code

Mozilla extensions for use by JS-implemented event targets to implement on* properties. See also WebIDL bindings.

  • void setEventHandler(DOMString type, EventHandler handler)
  • EventHandler getEventHandler(DOMString type)