Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The storage object provides functions related to the player storage. This object is available as of BOS 9.0.168.

system IDL

Code Block
languagejs
[
    constructor()
] interface Storage {
    Promise<void> eject(String mountPoint);
    Promise<void> format(String mountPoint, String fileSystemType);
};
Panel
borderColor#3D3D3D
bgColor#F4F4F4
titleColor#3D3D3D
borderWidth0
titleBGColor#3D3D3D
borderStylesolid

ON THIS PAGE

Table of Contents
indent20px

Object Creation

To create a storage object, first load the brightsign/storage module using the require() method. Then create an instance of the storage class.

Code Block
languagejs
var storageClass = require("@brightsign/storage");
var storage = new storageClass();

Storage

Use this interface to call the following methods:

eject()
Code Block
languagejs
Promise<void> eject(String mountPoint)

Ejects the player storageThe storage device is prepared for safe removal and may be physically ejected if that is supported by the storage device.

format()
Code Block
languagejs
Promise<void> format(String mountPoint, String fileSystemType)

Formats the player storagethe specified drive using one of the file systems listed below:

  • vfat (FAT32, DOS/Windows file system): Readable and writable by Windows, Linux, and MacOS.

  • exfat (DOS/Windows file system): Supported on Series 3, 4 and 5 players. 

  • ext2 (Linux file system): Writable by Linux and readable by Windows and MacOS with additional software.

  • ext3 (Linux file system): Writable by Linux and readable by Windows and MacOS with additional software. 

  • ext4 (Linux file system): Writable by Linux and readable by Windows and MacOS with additional software. This is the recommended file system for SSD devices and USB hard drives.

Examples

Code Block
languagejs
const Storage = require("@brightsign/storage");
let storage = new Storage();
storage.eject("/storage/sd").then(() => { console.log("SD card can now be removed\n"); } );
Code Block
languagejs
const Storage = require("@brightsign/storage");
let storage = new Storage();
storage.format("/storage/sd", "vfat").then(() => { console.log("SD card has been formatted\n");});