AbstractMassStorageService

AbstractMassStorageService ⇐ Abstract

Kind: global abstract class
Extends: Abstract
Service:

getAvailableDevices(options) ⇒ Promise.<string>

Get all available devices

Kind: instance method of AbstractMassStorageService

ParamTypeDescription
optionsObject

additional options

getAvailablePartitions(deviceId) ⇒ Promise.<string>

Get all partitions of a device, if not exist return an empty array.

Kind: instance method of AbstractMassStorageService

ParamTypeDescription
deviceIdstring

id of device

getStatus(deviceId) ⇒ Promise.<number>

Get device status, STATE_READY | STATE_REMOVED

Kind: instance method of AbstractMassStorageService

ParamTypeDescription
deviceIdstring

id of device

getTotalSpace(deviceId) ⇒ Promise.<number>

The total capacity (in megabytes) of the storage device.

Kind: instance method of AbstractMassStorageService

ParamTypeDescription
deviceIdstring

id of device

getFreeSpace(deviceId) ⇒ Promise.<number>

The space (in megabytes) available on the storage device

Kind: instance method of AbstractMassStorageService

ParamTypeDescription
deviceIdstring

id of device

getPartitionFs(partitionId) ⇒ Promise.<string>

Get partition file system type

Kind: instance method of AbstractMassStorageService

ParamTypeDescription
partitionIdstring

id of partition

format(deviceId, fsType) ⇒ Promise.<number>

Format the mass storage

Kind: instance method of AbstractMassStorageService

ParamTypeDescription
deviceIdstring

id of device

fsTypestring

_getAvailableDevices(options) ⇒ Promise.<string>

Kind: instance abstract method of AbstractMassStorageService
Access: protected

ParamTypeDescription
optionsObject

additional options

_getAvailablePartitions(deviceId) ⇒ Promise.<string>

Kind: instance abstract method of AbstractMassStorageService
Access: protected

ParamTypeDescription
deviceIdstring

id of device

_getStatus(deviceId) ⇒ Promise.<number>

Kind: instance abstract method of AbstractMassStorageService
Access: protected

ParamTypeDescription
deviceIdstring

id of device

_getTotalSpace(deviceId) ⇒ Promise.<number>

Kind: instance abstract method of AbstractMassStorageService
Access: protected

ParamTypeDescription
deviceIdstring

id of device

_getFreeSpace(deviceId) ⇒ Promise.<number>

Kind: instance abstract method of AbstractMassStorageService
Access: protected

ParamTypeDescription
deviceIdstring

id of device

_getPartitionFs(partitionId) ⇒ Promise.<string>

Kind: instance abstract method of AbstractMassStorageService
Access: protected

ParamTypeDescription
partitionIdstring

id of device

_format(deviceId, fsType) ⇒ Promise.<number>

Kind: instance abstract method of AbstractMassStorageService
Access: protected

ParamTypeDescription
deviceIdstring

id of device

fsTypestring

_onDeviceInsert() ⇒ Promise

Fired when a device was inserted

Kind: instance method of AbstractMassStorageService
Access: protected

_onDeviceReady() ⇒ Promise

Fired when a device was ready to use

Kind: instance method of AbstractMassStorageService
Access: protected

_onDeviceNotReady() ⇒ Promise

Fired when a device was not ready to use

Kind: instance method of AbstractMassStorageService
Access: protected

_onDeviceRemove() ⇒ Promise

Fired when a device was removed

Kind: instance method of AbstractMassStorageService
Access: protected

“deviceInsert”

Fired when a device was inserted

Kind: event emitted by AbstractMassStorageService

“deviceReady”

Fired when a device was ready to use

Kind: event emitted by AbstractMassStorageService

“deviceNotReady”

Fired when a device was not ready to use

Kind: event emitted by AbstractMassStorageService

“deviceRemove”

Fired when a device was removed

Kind: event emitted by AbstractMassStorageService