LavinMQ::FileSystem
Durable variants of directory entry changes. Data written through a file
isn't reachable after a crash until its directory entry is on disk too, so
renames and newly created directories fsync the directory they changed.
The fsyncs are skipped when sync is disabled.
Class methods
Renames the open file in place, so the caller can keep using it under its new path
Like Dir.mkdir_p, but also fsyncs the parent of each created directory
Like Dir.mkdir_p, but yields the parent of each created directory,
outermost first, for the caller to make its new entry durable
Whether ex is a failed syscall for lack of a free file descriptor,
either in this process (EMFILE) or system wide (ENFILE)
Atomically replaces path with what the block writes, via a tmp file