Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qix-/node-atomic-fs
Atomically perform file operations
https://github.com/qix-/node-atomic-fs
Last synced: 26 days ago
JSON representation
Atomically perform file operations
- Host: GitHub
- URL: https://github.com/qix-/node-atomic-fs
- Owner: Qix-
- License: mit
- Created: 2015-08-27T17:16:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-27T17:52:40.000Z (about 9 years ago)
- Last Synced: 2024-10-04T13:42:23.174Z (about 2 months ago)
- Language: CoffeeScript
- Size: 105 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-atomic-fs [![Travis-CI.org Build Status](https://img.shields.io/travis/Qix-/node-atomic-fs.svg?style=flat-square)](https://travis-ci.org/Qix-/node-atomic-fs) [![Coveralls.io Coverage Rating](https://img.shields.io/coveralls/Qix-/node-atomic-fs.svg?style=flat-square)](https://coveralls.io/r/Qix-/node-atomic-fs)
> Atomically perform file operationsWorks similarly to a mutex for files. This means *all* file operations must be
wrapped in calls to `atomicFs` in order to achieve locks.## Example
```javascript
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](http://opensource.org/licenses/MIT).
You can find a copy of it in [LICENSE](LICENSE).