Native File Monopolist
Open a file handle exclusively and hold it, in order to other processes cannot access the file.
Install
npm install native-file-monopolist
Or
yarn add native-file-monopolist
Build
yarn configureyarn build
Test
yarn test
Use
; const filePath = 'C:\\your-file-path';const monopolist = filePath; console; // falseconsole; // 'C:\\your-file-path' const errorCode = monopolist;; console; // trueconst success = monopolist; // trueconsole; // false
API
See index.d.ts
file for details.