开发者

Directories created by boost::filesystem::create_directories() not immediately accessible?

I am using boost::filesystem::create_directories() to create new directories. When I try to access these directories shortly after creation, I get an error saying: no such directory. But if I sleep for a wh开发者_开发技巧ile after creating directories everything is fine (I do not get the error). Also, I tried using fsync() and sync() after creating directories but it made no difference. I am testing it on ext4 and xfs file systems and my boost version is boost 1.44

My questions are

  1. Does boost::create_directories() create directories instantly? Or is it possible that something is wrong there?
  2. Also, are sync() and fsync() guaranteed to flush everything to disc on ext4/xfs?
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜