node-atomic-fs
Atomically perform file operations
Works similarly to a mutex for files. This means all file operations must be
wrapped in calls to atomicFs
in order to achieve locks.
Example
var atomicFs = require('atomic-fs');
atomicFs('some/path/to/file',
function (cb) {
/* locked */
/* some file operations */
cb();
},
function (err) {
/* unlocked */
});
License
Licensed under the MIT License. You can find a copy of it in LICENSE.