Bitcointalk · auto backing up of wallet.dat

中本聪,2010 年 8 月 27 日

SN-2611 已核对来源,附原文与上下文。

阅读语言
中文译文

倘若你把它读进内存再写出去,在内存紧张的情况下恐会失败。

我在找类似 copyfile(const char* from, const char* to) 或 copyfile(path from, path to) 的东西,最好 Boost 里就有。倘若你能帮我找到,我就更有可能动手实现它。

至于文件拷贝,为什么要加深 boost 依赖?我就希望核心库依赖越少越好。

我们需要 Boost 来做 JSON 和十来件原本依赖 wxWidgets 的事。Boost 是优秀的、可移植的库,我们不该躲着它。

ORIGINAL · 英文原文
If you read it into memory and write it out, it could fail in tight memory situations.

I'm looking for something like copyfile(const char* from, const char* to) or copyfile(path from, path to), preferably something in Boost if it has it.  If you find it for me, it's more likely I'll get to implementing it.

As for the file copy, why add to the boost dependency? I for one would love to get a core lib with very little deps.
We require Boost for JSON and a dozen things replacing dependencies on wxWidgets.  Boost is good, portable stuff, we should not shy away from it.
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-2611