1.6.0 • Published 4 years ago

is-file-opened v1.6.0

Weekly downloads
85
License
ISC
Repository
github
Last release
4 years ago

is-file-opened

Detect file opened in windows and mac, based on opened and lsof-mac-fast

Installation

$ npm install is-file-opened --save

Api

detectFile(file)

detectFiles(files)

parseLsofRaw(lsofStr)

Usage

const path = require('path')
const isFileOpened = require('is-file-opened')

const file = path.join(__dirname, 'some.file')

isFileOpened.detectFile(file).then(function(opened) {
  console.log('opened', opened) // true or false
}).catch(err => {
  console.log('crash', err)
})

isFileOpened.detectFiles([file]).then(function(openedMap) {
  console.log('openedMap', openedMap) // { 'some.file': Boolean }
}).catch(err => {
  console.log('crash', err)
})

License

MIT

1.6.0

4 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago