Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 379 Bytes

move.md

File metadata and controls

17 lines (12 loc) · 379 Bytes

move(src, dest, [options], callback)

Moves a file or directory, even across devices.

Options:

  • overwrite (boolean): overwrite existing file or directory, default is false

Example:

var fs = require('fs-extra')

fs.move('/tmp/somefile', '/tmp/does/not/exist/yet/somefile', function (err) {
  if (err) return console.error(err)
  console.log("success!")
})