cmy a6e36702ec 2023-3-1 há 2 anos atrás
..
node_modules a6e36702ec 2023-3-1 há 2 anos atrás
test a6e36702ec 2023-3-1 há 2 anos atrás
.npmignore a6e36702ec 2023-3-1 há 2 anos atrás
.travis.yml a6e36702ec 2023-3-1 há 2 anos atrás
LICENSE a6e36702ec 2023-3-1 há 2 anos atrás
README.md a6e36702ec 2023-3-1 há 2 anos atrás
index.js a6e36702ec 2023-3-1 há 2 anos atrás
package.json a6e36702ec 2023-3-1 há 2 anos atrás

README.md

Build Status

Usage:

var mv = require('mv');

mv('source/file', 'dest/file', function(err) {
  // done. it tried fs.rename first, and then falls back to
  // piping the source file to the dest file and then unlinking
  // the source file.
});

Another example:

mv('source/dir', 'dest/a/b/c/dir', {mkdirp: true}, function(err) {
  // done. it first created all the necessary directories, and then
  // tried fs.rename, then falls back to using ncp to copy the dir
  // to dest and then rimraf to remove the source dir
});

Another example:

mv('source/file', 'dest/file', {clobber: false}, function(err) {
  // done. If 'dest/file' exists, an error is returned
  // with err.code === 'EEXIST'.
});