fsync的顺序/方向重要吗?
Does the order/direction of fsync matter?
假设我将一些文件和目录写入u盘。
/media/drive1/newFolder1/
/media/drive1/newFolder1/newfile1
/media/drive1/newFolder1/newfile2
我已经创建了一个文件夹newFolder1
和两个文件newfile1
和newfile2
。
同步不会自动发生,所以我需要fsync
更改。
所以我需要在newFolder1
, newfile1
和newfile2
上调用fsync
。
问题是,我做这些的顺序有关系吗?
这对内容没有影响,但是如果目录没有在文件之后同步,那么最后修改时间可能是错误的。
相关文章:
- CMake-按正确顺序将项目与C运行时对象文件链接
- 函数调用中参数的顺序重要吗
- 为什么不;名字在地图上是按顺序排列的吗
- 将Integer转换为4字节的unsined字符矢量(按大端字节顺序)
- 使用Unreal C++获取VR耳机的世界位置/方向
- 数到第n个楼梯的路(顺序无关紧要)
- 优先顺序:智能指针和类析构函数
- 在循环中按顺序遍历成员变量
- 独立读取-修改-写入顺序
- QML按钮点击功能执行顺序
- C++中数据类型修饰符的顺序
- 当比特(而不是字节)的顺序至关重要时的持久性
- C++从其他 constexpr 创建 lambda 不能按顺序执行 Constexpr
- 通过选项卡的文本设置QTabWidget顺序
- c++11评估顺序(未定义的行为)
- 在C++中向零方向近似的最佳方法
- 垂直方向的 Gtk3+ 旋转按钮 (c/c++)
- 如何在C++中递归地按相反顺序打印集合
- 给定顺序中的事件处理
- fsync的顺序/方向重要吗?