backupOneToDirectory static method
backup one MMKV instance to dstDir
rootDir
the customize root path of the MMKV, if null then backup from the root dir of MMKV
Implementation
static bool backupOneToDirectory(String mmapID, String dstDir, {String? rootDir}) {
final mmapIDPtr = mmapID.toNativeUtf8();
final dstDirPtr = dstDir.toNativeUtf8();
final rootDirPtr = _string2Pointer(rootDir);
final ret = _backupOne(mmapIDPtr, dstDirPtr, rootDirPtr);
calloc.free(mmapIDPtr);
calloc.free(dstDirPtr);
calloc.free(rootDirPtr);
return _int2Bool(ret);
}