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.
var storageClass = require("@brightsign/storage"); var storage = new storageClass();
Storage
Use this interface to call the following methods:
eject()
Promise<void> eject(String mountPoint)
The storage device is prepared for safe removal and may be physically ejected if that is supported by the storage device.
format()
Promise<void> format(String mountPoint, String fileSystemType)
Formats the player storage
Examples
const Storage = require("@brightsign/storage"); let storage = new Storage(); storage.eject("/storage/sd").then(() => { console.log("SD card can now be removed\n"); } );
const Storage = require("@brightsign/storage"); let storage = new Storage(); storage.format("/storage/sd", "vfat").then(() => { console.log("SD card has been formatted\n");});