Bitcointalk

auto backing up of wallet.dat

中本聪 · 2010 年 8 月 27 日

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

阅读语言

我怀疑 Windows 上没有 mmap(2)。我宁可调用现成的文件拷贝函数,也不想自己写一个再测试。

I doubt there's an mmap(2) on Windows. I'd rather call an existing file copy function than make and test my own.

其他参与者原话nelisky原帖 ↗

但如果你已经在用 boost::filesystem 的功能,直接用它里面的 copy_file 就行。我只是觉得,如果不是为了别的用途已经引入了它,那有点杀鸡用牛刀。

But if you are already using features from boost::filesystem you can use copy_file from that. I just think that, if not already required for something else, it's a tad overkill.

中本聪回应

谢谢。我原以为里面某处会有。

Thanks. I thought it would be in there somewhere.

我们已经在十几个地方用了 boost::filesystem。这并非新增依赖。它给了我们大量可移植的东西,否则每个系统都得写 #ifdef,到处测试。

We already use boost::filesystem in a dozen places. It's not a new added dependency. It gives us a lot of portable stuff that we would otherwise have to have a #ifdef for each OS and test everywhere.

来源
Bitcointalk 原始链接 ↗ 记录编号 SN-2614

阅读字号

选择适合你的字号,之后阅读会继续使用。