@camol/file-lock
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

file-lock

使用 node-addon-api 开发,用于独占打开文件。

Support

os support
windows
mac
linux

Install Package

yarn add @camol/file-lock

Usage

const FileLock = require("@camol/file-lock");

const filePath = "/tmp/xxx";
const fileLock = new FileLock(filePath);

fileLock.lock(); // boolean
fileLock.isLocked(); // true
//
fileLock.unlock();
fileLock.isLocked(); // false

Readme

Keywords

none

Package Sidebar

Install

npm i @camol/file-lock

Weekly Downloads

2

Version

1.1.4

License

MIT

Unpacked Size

15.7 kB

Total Files

10

Last publish

Collaborators

  • camol