Skip to main content
Version: v1.0

getDiskInfo

Get disk information.

Type

() => diskInfo

Parameters

diskInfo: object

PropertyDescriptionType
totaltotal spacenumber
freefree spacenumber
appjs application space usednumber
watchfacewatchfacenumber
musicspace used for musicnumber
systemsystem used spacenumber

Code example

const diskInfo = hmSetting.getDiskInfo()
console.log(
'disk Info:',
diskInfo.total / 1024 / 1024,
diskInfo.free / 1024 / 1024,
diskInfo.app / 1024 / 1024,
diskInfo.watchface / 1024 / 1024,
diskInfo.music,
diskInfo.system / 1024 / 1024
)