原始文献 / 论坛帖 / Re: auto backing up of wallet.dat
Re: auto backing up of wallet.dat
Bitcointalk · 2010-08-27 01:13:42 UTC
如果读进内存再写出来,在内存紧张时可能会失败。
我在找类似 copyfile(const char* from, const char* to) 或 copyfile(path from, path to) 的东西,最好是 Boost 里现成的。如果你能帮我找到,我更有可能去实现它。
引用自 nelisky,发表于 August 26, 2010, 01:21:57 AM(https://bitcointalk.org/index.php?topic=921.msg11232#msg11232)
至于文件复制,为什么要增加对 boost 的依赖?我个人希望核心库的依赖越少越好。
我们用 Boost 做 JSON 和十几样取代 wxWidgets 依赖的东西。Boost 是好用、可移植的东西,我们不该回避它。
英文原文
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.
Quote from: nelisky on August 26, 2010, 01:21:57 AM(https://bitcointalk.org/index.php?topic=921.msg11232#msg11232)
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.
