Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

ON THIS PAGE

The storageinfo object provides information about a storage device connected to the player. To retrieve information about the filesystem on the device, use the filesystem object.

storageinfo IDL
[
    GarbageCollected,
    constructor(DOMString path, DOMString type)
] interface StorageInfo {
    Promise <bool> isReadOnly();
    Promise <DOMString> getFilesystemType();
    Promise <number> getDeviceSize();
    Promise <StorageDeviceInfo> getDeviceInfo();
    Promise <StorageStats> getStatistics();
}

interface StorageDeviceInfo {
    attribute number size;

    attribute DOMString productName; //@Optional
    attribute DOMString oemID; //@Optional
    attribute DOMString auSize; //@Optional
    attribute DOMString productRev; //@Optional
    attribute DOMString mfrDate; //@Optional
    attribute DOMString serial; //@Optional
    attribute DOMString signalVoltage; //@Optional
    attribute DOMString uhsMode; //@Optional
    attribute number specVersion; //@Optional
    attribute DOMString speedClass; //@Optional
    attribute number mfrID; //@Optional

    attribute DOMString sataModel; //@Optional
    attribute DOMString sataVendor; //@Optional
}

interface StorageStats {
    attribute number blockSize;
    attribute number sizeBytes;
    attribute number bytesFree;
    attribute number filesUsed;
    attribute number filesFree;
    attribute bool isReadOnly;
}

Object Creation

To create an storageinfo object, first load the brightsign/storageinfo module using the Require() method. Then create an instance of the storageinfo class with a string value specifying the storage path.

var StorageInfoClass = require("@brightsign/storageinfo");
var storageInfo = new StorageInfoClass("/storage/sd");

Use the following string values to specify different storage drives:

  • "/storage/usb1" – The drive for USB storage devices connected to the player
  • "/storage/sd" – The primary SD or microSD drive on the player.
  • "/storage/sd2" – The internal microSD drive on the player (4Kx42, XDx32 models only)
  • "/storage/ssd" – The internal SSD on the player (XTx44, XTx43, XDx34, and XDx33 models only)

StorageInfo

Use this interface to retrieve information about the storage device.

getDeviceSize()
Promise <Number> getDeviceSize

Returns the total size of the storage device (in bytes).

The size returned by this method uses a different tool from the size parameter in the StorageDeviceInfo interface. The values returned using the two processes will be approximately, but not exactly, the same.

getDeviceInfo()
Promise <StorageDeviceInfo> getDeviceInfo()

Returns a StorageDeviceInfo interface containing manufacturer information about the storage device.

StorageDeviceInfo

This interface contains manufacturer information about the storage device. Any of the below parameters may be absent from the interface depending on the device type and the information returned by the device:

  • [Number] size
  • [DOMString] productName
  • [DOMString] oemID
  • [DOMString] auSize
  • [DOMString] productRev
  • [DOMString] mfrDate
  • [DOMString] serial
  • [DOMString] signalVoltage
  • [DOMString] uhsMode
  • [Number] specVersion
  • [DOMString] speedClass
  • [Number] mfrID
  • [DOMString] sataModel
  • [DOMString] sataVendor

 

  • No labels