http://bugs.winehq.org/show_bug.cgi?id=12401
--- Comment #38 from Dan Kegel dank@kegel.com 2012-07-17 12:16:31 CDT --- Googling around finds a few people asking how to swap files atomically https://lkml.org/lkml/2010/11/25/330 so the idea might resonate.
For what it's worth, MacOSX has an exchangedata() call that is similar but only works for files, not directories.