rename-overwrite
Like `fs.rename` but overwrites existing file or directory
Last updated 4 months ago by zkochan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install rename-overwrite 
SYNC missed versions from official npm registry.

rename-overwrite

Like fs.rename but overwrites existing file or directory

Install

Install it via npm.

<npm|yarn|pnpm> add rename-overwrite

Usage

const renameOverwrite = require('rename-overwrite')

renameOverwrite('old-dir-name', 'new-dir-name')
  .then(() => console.log('done'))
  .catch(err => console.log(err))

API

renameOverwrite(oldPath, newPath) => Promise<void>

Renames a file or directory asynchronously. Overwrites existing file or directory.

renameOverwrite.sync(oldPath, newPath)

Renames a file or directory synchronously. Overwrites existing file or directory.

License

MIT

Current Tags

  • 6.0.0                                ...           latest (4 months ago)
  • 4.0.0                                ...           next (4 years ago)
  • 3.0.0                                ...           pnpm-temp (5 years ago)

23 Versions

  • 6.0.0                                ...           4 months ago
  • 5.0.4                                ...           4 months ago
  • 5.0.3                                ...           4 months ago
  • 5.0.2                                ...           4 months ago
  • 5.0.1                                ...           4 months ago
  • 5.0.0                                ...           a year ago
  • 4.0.4                                ...           a year ago
  • 4.0.3                                ...           2 years ago
  • 4.0.2                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.0                                ...           4 years ago
  • 3.1.2                                ...           4 years ago
  • 3.1.1                                ...           4 years ago
  • 3.1.0                                ...           4 years ago
  • 3.0.0                                ...           5 years ago
  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           7 years ago
  • 1.0.1                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
  • 0.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Total 1
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (7)

© 2010 - cnpmjs.org x YWFE | Home | YWFE