Is an atomic-rename possible in Mac VFS/HFS+?

前端 未结 1 598
无人共我
无人共我 2021-01-28 16:52

With support for ACLs in Mac OS X, there is a way to declare a file as writeable but non-deletable.

This poses a problem with atomic writes, since the current implementa

相关标签:
1条回答
  • 2021-01-28 17:20

    A viable alternative would seem to create the file in a temporary directory, then call exchangedata on both files. HFS exports the VOL_CAP_INT_EXCHANGEDATA attribute, so that should work. The relevant checks in vfs_syscalls.c indicate that only read and write permissions are necessary for the call to succeed.

    0 讨论(0)
提交回复
热议问题