Skip to content

回复:自动备份 wallet.dat ​

原始发布页

打开来源页面
查看 1 个交叉存档

我怀疑 Windows 上有 mmap(2)。我宁愿调用现有的文件复制函数,也不愿自己编写和测试一个。

引用 nelisky 于 2010 年 8 月 27 日 01:21:09 AM 的发言

不过,如果你已经在使用 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

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.

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。