A fast, resilient, and user-friendly Node.js library for copying files with glob support and progress reporting.
cpy is a Node.js library for copying files that emphasizes speed, resilience, and ease of use. It supports glob patterns, automatically creates destination directories, and provides progress reporting, solving the need for a reliable and feature-rich file copying solution in Node.js applications.
Node.js developers who need to programmatically copy files in their applications, especially those working with build tools, scripts, or file processing pipelines.
Developers choose cpy for its combination of performance (via file cloning), robustness (with graceful-fs), and developer-friendly features like glob support and progress tracking, making it a superior alternative to basic file copying methods.
Copy files
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses modern file system capabilities like copyFile with FICLONE for optimal performance, as highlighted in the README for speed improvements.
Built on graceful-fs to handle edge cases gracefully, ensuring reliability in various file system conditions without manual error handling.
Integrates globby for advanced pattern matching including negation, making file selection intuitive and reducing boilerplate code.
Provides real-time progress updates via onProgress callback with detailed metrics on files and bytes copied, useful for build tools and scripts.
Creates non-existent destination directories automatically, simplifying the copy process and avoiding common setup errors.
The rename option has a deprecated single-argument form that will be removed in the next major release, indicating potential compatibility issues and need for code updates.
Tied to the Node.js runtime, making it unsuitable for browser-based or other non-Node.js environments, limiting its portability.
With numerous options like concurrency control and filtering, it can be complex for basic file copy needs where simpler methods like fs.copyFile suffice.