getStorageInfoSync

Requires:
BaseKit≥3.30.1@ray-js/ray≥1.7.60
Platforms:
iOSAndroid

Method signature
getStorageInfoSync()
Minimum SDK versions
iOSThingSmartBaseKitBizBundle
≥ 7.5.0
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 7.5.0

Description

Asynchronously obtain information about the current storage

Parameters

None

Return Value

Type: Object↓
PropertyTypeDescriptionMinimum SDK versions
keysstring[]All keys in the current storage—
currentSizenumberCurrent space used, in KB—
limitSizenumberSpace limit, in KB—

Examples

import { getStorageInfo } from '@ray-js/ray'

// Get current storage info: all keys, used size, limit size (KB)
getStorageInfo({
  success: data => console.log("keys:", data.keys, "used:", data.currentSize, "limit:", data.limitSize),
  fail: error => console.error(error),
});