Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@ronomon/opened
Advanced tools
Check if a file is open in another application on Windows, macOS and Linux.
Check if a file is open in another application on Windows, macOS and Linux. Linux requires privileges.
npm install @ronomon/opened
Opened
uses a native binding on Windows to try and open an existing file with exclusive sharing mode (dwShareMode
) and detect an ERROR_SHARING_VIOLATION
error if another application already has an open handle to the file. This will detect any applications with open handles to the file, but not applications which have opened, buffered the file for display, and then closed the handle (i.e. applications which may be showing the file to the user, but which no longer have an open handle to the file).
Opened
uses lsof
on macOS and on Linux. On Linux (but not on macOS), lsof
requires sudo permissions to iterate across open file descriptors for the user, otherwise no files will be detected as open and no permissions error will be returned.
var Opened = require('@ronomon/opened');
var paths = [...];
Opened.files(paths,
function(error, hashTable) {
if (error) throw error;
paths.forEach(
function(path) {
console.log(path + ' open=' + hashTable[path]);
}
);
}
);
node test.js
FAQs
Check if a file is open in another application on Windows, macOS and Linux.
The npm package @ronomon/opened receives a total of 181 weekly downloads. As such, @ronomon/opened popularity was classified as not popular.
We found that @ronomon/opened demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.