`chmodrp` is a lightweight utility package for Node.js that provides a recursive `chmod` functionality, mirroring the behavior of the `chmod -R` command-line operation. It exposes this capability through a modern, Promise-based API, simplifying asynchronous file permission management. The current stable version is 1.0.2, and as a focused utility, it typically follows an infrequent release cadence, with updates primarily for maintenance or minor enhancements. Its core differentiator is the ergonomic Promise interface, which integrates seamlessly with `async/await` patterns, offering a significant improvement over traditional callback-based `fs` methods for ensuring consistent file and directory permissions in build systems, deployment scripts, and automated administrative tasks.
npm install chmodrpVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to use `chmodrp` to recursively set file and directory permissions within a temporary directory, showing basic setup and error handling.
Always use octal literal notation (e.g., `0o755`) or parse strings to integers (`parseInt('755', 8)`) for the permission `mode`.Ensure the user running the Node.js process has appropriate write and execute permissions on the target directory and its files. This may involve using `sudo` or adjusting file ownership/permissions manually beforehand.
Correct the mode argument to an octal number, e.g., change `'755'` to `0o755`.
No dependency data recorded yet.