原始文献 / 论坛帖 / Re: auto backing up of wallet.dat
Re: auto backing up of wallet.dat
Bitcointalk · 2010-08-27 02:54:07 UTC
我怀疑 Windows 上没有 mmap(2)。我宁愿调用现成的文件复制函数,也不愿自己写一个再测试。
引用自 nelisky,发表于 August 27, 2010, 01:21:09 AM(https://bitcointalk.org/index.php?topic=921.msg11346#msg11346)
但如果你已经在用 boost::filesystem 的功能,就可以用它里面的 copy_file。我只是觉得,如果不是别处已经需要它,就有点小题大做了。
谢谢。我就想它应该在里面某个地方。
我们已经在十几处用了 boost::filesystem。这不是新增的依赖。它给了我们很多可移植的东西,否则我们得为每个操作系统写 #ifdef,还得到处测试。
英文原文
I doubt there's an mmap(2) on Windows. I'd rather call an existing file copy function than make and test my own.
Quote from: nelisky on August 27, 2010, 01:21:09 AM(https://bitcointalk.org/index.php?topic=921.msg11346#msg11346)
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.
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.
