storage/sp_backup_io library
Functions
-
backupSpFile(
) → Future< void> - init 成功后的备份入口(SpUtils 调用)。非 Windows no-op。
-
backupToFile(
{required String livePath, required String backupPath}) → Future< void> -
把
livePath复制为backupPath(覆盖旧备份)。 -
isValidSpJson(
String content) → bool -
校验
content是否为「合法 JSON 且顶层为对象」——回写现场前对备份 内容的最低置信要求。 -
restoreFromFile(
{required String livePath, required String backupPath}) → Future< void> -
用
backupPath恢复livePath:先校验后替换。 -
restoreSpFile(
) → Future< void> - init 失败后的恢复入口(SpUtils 调用)。非 Windows no-op。