Object mc.getStorageInfoSync()

mc.getStorageInfo 的同步版本

返回值

属性 类型 说明
keys [String] 当前 storage 中所有的 key
currentSize Number 当前占用的空间大小, 单位 KB
limitSize Number 限制的空间大小,单位 KB , -1 表示不限制

示例代码:

const res = mc.getStorageInfoSync()
console.log(res.keys)
console.log(res.currentSize)
console.log(res.limitSize)

results matching ""

    No results matching ""

    results matching ""

      No results matching ""