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.

3 jaren geleden
123456789101112131415161718192021222324
  1. # moveSync(src, dest, [options])
  2. Moves a file or directory, even across devices.
  3. - `src` `<String>`
  4. - `dest` `<String>`
  5. - `options` `<Object>`
  6. - `overwrite` `<boolean>`: overwrite existing file or directory, default is `false`.
  7. ## Example:
  8. ```js
  9. const fs = require('fs-extra')
  10. fs.moveSync('/tmp/somefile', '/tmp/does/not/exist/yet/somefile')
  11. ```
  12. **Using `overwrite` option**
  13. ```js
  14. const fs = require('fs-extra')
  15. fs.moveSync('/tmp/somedir', '/tmp/may/already/existed/somedir', { overwrite: true })
  16. ```