getTempDirectory

Requires:
BaseKit≥2.2.3@ray-js/ray≥1.5.30
Platforms:
iOSAndroid
import { getTempDirectory } from '@ray-js/ray';

// Promise usage
try {
  const res = await getTempDirectory();
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Method signature
getTempDirectory(params: )
Minimum SDK versions
iOSThingSmartBaseKitBizBundle
≥ 5.2.1
Androidcom.thingclips.smart:thingsmart-bizbundle-basekit
≥ 5.2.0

Description

Get the common cache path

Parameters

PropertyTypeRequiredDescription
complete() => voidNoCompletion callback (executed on both success and failure)
success(params: Object) => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
success callback parameters
PropertyTypeDescriptionBaseKit SinceMinimum SDK versions
tempDirectorystring[Deprecated, not recommended] Temporary folder pathv3.2.6—
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

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

getTempDirectory({
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});