---
title: storage
slug: develop/storage
docTags: 
createdAt: 2025-03-27T16:56:39.394Z
---

The *storage&#xA0;*&#x6F;bject provides functions related to the player storage (USB1, SD, SD2, SSD, and/or Flash). This object is available as of BOS 9.0.168.

:::hint{type="info"}
See [this page](docId\:qcEvA3OCMVeT4jzT5L6PE) for more information about device storage paths.
:::

**system IDL**

```javascript
[
    constructor()
] interface Storage {
    Promise<void> eject(String mountPoint);
    Promise<void> format(String mountPoint, String fileSystemType);
    attribute Array<String> priorityOrder;
};
```

## 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.

```javascript
const Storage = require("@brightsign/storage");
let priorityOrder = new Storage().priorityOrder;
```

## Storage

Use this interface to call the following methods:

**eject()**

```javascript
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()**

```javascript
Promise<void> format(String mountPoint, String fileSystemType)
```

Formats the 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.

## priorityOrder

This read-only property contains the array of storage devices that will be searched by BrightSign OS for autorun scripts in order. Some of these storage devices may not be present on a particular player. For example:&#x20;

:::BlockQuote
\[ '/storage/usb1', '/storage/sd', '/storage/sd2', '/storage/ssd' ]
:::

## Examples

```javascript
const Storage = require("@brightsign/storage");
let storage = new Storage();
storage.eject("/storage/sd").then(() => { console.log("SD card can now be removed\n"); } );
```

```javascript
const Storage = require("@brightsign/storage");
let storage = new Storage();
storage.format("/storage/sd", "vfat").then(() => { console.log("SD card has been formatted\n");});
```

```javascript
const Storage = require("@brightsign/storage");
let storage = new Storage();
storage.format("/storage/usb1", "exfat").then(() => { console.log("USB card has been formatted\n");});
```

```javascript
const Storage = require("@brightsign/storage");
let storage = new Storage();
storage.format("/storage/flash", "exfat").then(() => { console.log("LGUV5N internal storage has been formatted\n");});
```

```javascript
const Storage = require("@brightsign/storage");
let storage = new Storage();
storage.format("/storage/sd2", "exfat").then(() => { console.log("Interal sd storage has been formatted\n");});
```

