getDiskInfo
Start from API_LEVEL
2.0
. Please refer to API_LEVEL.
Gets disk information.
Type
function getDiskInfo(): Result
Parameters
Result
Property | Type | Description | API_LEVEL |
---|---|---|---|
total | number | Total Space in bytes | 2.0 |
free | number | Available Space in bytes | 2.0 |
app | number | Space occupied by Mini Programs in bytes | 2.0 |
watchface | number | Space occupied by watchfaces in bytes | 2.0 |
music | number | Space occupied by musics in bytes | 2.0 |
system | number | Space occupied by system in bytes | 2.0 |
Example
import { getDiskInfo } from '@zos/device'
const { total } = getDiskInfo()
console.log(total)