Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@zkochan/rimraf
Advanced tools
@zkochan/rimraf is an npm package that provides a fast and efficient way to delete files and directories, including those that are read-only. It is a modern alternative to the traditional 'rimraf' package, offering better performance and additional features.
Delete a single file
This feature allows you to delete a single file. The callback function handles any errors that may occur during the deletion process.
const rimraf = require('@zkochan/rimraf');
rimraf('path/to/file.txt', (err) => {
if (err) throw err;
console.log('File deleted successfully');
});
Delete a directory and its contents
This feature allows you to delete a directory along with all its contents. The callback function handles any errors that may occur during the deletion process.
const rimraf = require('@zkochan/rimraf');
rimraf('path/to/directory', (err) => {
if (err) throw err;
console.log('Directory deleted successfully');
});
Delete read-only files and directories
This feature allows you to delete read-only files and directories. The 'glob' option is set to false to disable glob pattern matching.
const rimraf = require('@zkochan/rimraf');
rimraf('path/to/read-only-file-or-directory', { glob: false }, (err) => {
if (err) throw err;
console.log('Read-only file or directory deleted successfully');
});
rimraf is the original package for deleting files and directories, including read-only ones. It is widely used and well-tested but may not offer the same performance improvements as @zkochan/rimraf.
del is another popular package for deleting files and directories. It offers a promise-based API and supports glob patterns, making it a good alternative to @zkochan/rimraf.
fs-extra is a package that extends the native Node.js 'fs' module with additional methods, including methods for deleting files and directories. It provides a more comprehensive set of file system utilities compared to @zkochan/rimraf.
rm -rf for Node. Similar to rimraf but returns a promise
<npm|yarn|pnpm> add @zkochan/rimraf
const rimraf = require('@zkochan/rimraf')
await rimraf('node_modules')
FAQs
rm -rf for Node. Similar to rimraf but returns a promise
The npm package @zkochan/rimraf receives a total of 141,612 weekly downloads. As such, @zkochan/rimraf popularity was classified as popular.
We found that @zkochan/rimraf demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.