Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 831B

123456789101112131415161718192021222324252627282930313233
  1. [![Build Status](https://secure.travis-ci.org/andrewrk/node-mv.png)](http://travis-ci.org/andrewrk/node-mv)
  2. Usage:
  3. ------
  4. ```js
  5. var mv = require('mv');
  6. mv('source/file', 'dest/file', function(err) {
  7. // done. it tried fs.rename first, and then falls back to
  8. // piping the source file to the dest file and then unlinking
  9. // the source file.
  10. });
  11. ```
  12. Another example:
  13. ```js
  14. mv('source/dir', 'dest/a/b/c/dir', {mkdirp: true}, function(err) {
  15. // done. it first created all the necessary directories, and then
  16. // tried fs.rename, then falls back to using ncp to copy the dir
  17. // to dest and then rimraf to remove the source dir
  18. });
  19. ```
  20. Another example:
  21. ```js
  22. mv('source/file', 'dest/file', {clobber: false}, function(err) {
  23. // done. If 'dest/file' exists, an error is returned
  24. // with err.code === 'EEXIST'.
  25. });
  26. ```