
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
Move a file
The built-in fs.rename() is just a JavaScript wrapper for the C rename(2) function, which doesn't support moving files across partitions or devices. This module is what you would have expected fs.rename() to be.
$ npm install move-file
const moveFile = require('move-file');
(async () => {
await moveFile('source/unicorn.png', 'destination/unicorn.png');
console.log('The file has been moved');
})();
Returns a Promise that resolves when the file has been moved.
Type: string
File you want to move.
Type: string
Where you want the file moved.
Type: Object
Type: boolean
Default: true
Overwrite existing destination file.
MIT © Sindre Sorhus
fs-extra is a package that extends the native Node.js fs module with additional methods, including file moving capabilities. It provides a more comprehensive set of file system operations compared to move-file, such as copying, removing, and ensuring directories exist.
mv is a simple package for moving files and directories. It offers similar functionality to move-file but with a simpler API. It also supports overwriting existing files and ensuring the destination directory exists.
rename is a package focused on renaming files and directories. While it can be used to move files by renaming them to a new path, it lacks some of the additional features provided by move-file, such as ensuring the destination directory exists.
FAQs
Move a file - Even works across devices
The npm package move-file receives a total of 249,207 weekly downloads. As such, move-file popularity was classified as popular.
We found that move-file 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
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.