Files
dsh-purge/lib
叫我小杨同学 11d3c0748d fix(core): atomicWrite 别走 fsp.open / fsyncSync / closeSync
hostFs.promises 只包了 readFile/writeFile/mkdir/unlink/rm/copyFile,没 open;
hostFs 的同步侧也没 fsyncSync/closeSync。启动种子调 atomicWriteFile 立刻
抛 TypeError: fsp.open is not a function,applyBoot 整个倒下。

现在 atomicWriteSync/atomicWriteFile 只用 writeFile+rename,原子性靠 rename
(POSIX / Windows MoveFileEx),断电丢最新一次写入可接受,下一次 apply 补。
atomicCopyFile 原本就只用 copyFile+rename,不受影响。
2026-10-09 12:16:55 +08:00
..