{"name":"lockfile","version":"1.0.1","main":"lockfile.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"~0.2.5","touch":"0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git://github.com/isaacs/lockfile.git"},"keywords":["lockfile","lock","file","fs","O_EXCL"],"author":{"name":"Isaac Z. Schlueter","email":"i@izs.me","url":"http://blog.izs.me/"},"license":"ISC","description":"A very polite lock file utility, which endeavors to not litter, and to wait patiently for others.","gitHead":"9d338ed8e3e3a166955d051f6b5fb6bb1e563ca8","bugs":{"url":"https://github.com/isaacs/lockfile/issues"},"homepage":"https://github.com/isaacs/lockfile#readme","_id":"lockfile@1.0.1","_shasum":"9d353ecfe3f54d150bb57f89d51746935a39c4f5","_from":".","_npmVersion":"2.10.0","_nodeVersion":"2.0.1","_npmUser":{"name":"isaacs","email":"isaacs@npmjs.com"},"dist":{"shasum":"9d353ecfe3f54d150bb57f89d51746935a39c4f5","tarball":"http://registry-npm.ywwl.com/lockfile/download/lockfile-1.0.1.tgz","integrity":"sha512-IqiWECD26R4l3zTTKuSbiNztuiVAfXJxAPPEHOWFc2h0ju65h5I75mjeaeZY9j5+hxL/RttUPuU70Q1OPugn1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpACKgoJ5XA6MQE8v/2wGUQx5cGHDdCUKTeHurOJkcLAiATrFtcPo6oNGBKhEZGqqQwNlbToVqZTccShvZCjpOvAg=="}],"size":7441,"noattachment":false,"key":"/lockfile/-/lockfile-1.0.1.tgz"},"maintainers":[{"name":"trevorburnham","email":"trevorburnham@gmail.com"},{"name":"isaacs","email":"i@izs.me"}],"readme":"# lockfile\n\nA very polite lock file utility, which endeavors to not litter, and to\nwait patiently for others.\n\n## Usage\n\n```javascript\nvar lockFile = require('lockfile')\n\n// opts is optional, and defaults to {}\nlockFile.lock('some-file.lock', opts, function (er) {\n  // if the er happens, then it failed to acquire a lock.\n  // if there was not an error, then the file was created,\n  // and won't be deleted until we unlock it.\n\n  // do my stuff, free of interruptions\n  // then, some time later, do:\n  lockFile.unlock('some-file.lock', function (er) {\n    // er means that an error happened, and is probably bad.\n  })\n})\n```\n\n## Methods\n\nSync methods return the value/throw the error, others don't.  Standard\nnode fs stuff.\n\nAll known locks are removed when the process exits.  Of course, it's\npossible for certain types of failures to cause this to fail, but a best\neffort is made to not be a litterbug.\n\n### lockFile.lock(path, [opts], cb)\n\nAcquire a file lock on the specified path\n\n### lockFile.lockSync(path, [opts])\n\nAcquire a file lock on the specified path\n\n### lockFile.unlock(path, cb)\n\nClose and unlink the lockfile.\n\n### lockFile.unlockSync(path)\n\nClose and unlink the lockfile.\n\n### lockFile.check(path, [opts], cb)\n\nCheck if the lockfile is locked and not stale.\n\nCallback is called with `cb(error, isLocked)`.\n\n### lockFile.checkSync(path, [opts])\n\nCheck if the lockfile is locked and not stale.\n\nReturns boolean.\n\n## Options\n\n### opts.wait\n\nA number of milliseconds to wait for locks to expire before giving up.\nOnly used by lockFile.lock.  Poll for `opts.wait` ms.  If the lock is\nnot cleared by the time the wait expires, then it returns with the\noriginal error.\n\n### opts.pollPeriod\n\nWhen using `opts.wait`, this is the period in ms in which it polls to\ncheck if the lock has expired.  Defaults to `100`.\n\n### opts.stale\n\nA number of milliseconds before locks are considered to have expired.\n\n### opts.retries\n\nUsed by lock and lockSync.  Retry `n` number of times before giving up.\n\n### opts.retryWait\n\nUsed by lock.  Wait `n` milliseconds before retrying.\n","publish_time":1432105333163,"_cnpm_publish_time":1432105333163,"dist-tags":{"latest":"1.0.4"}}