javascript - node.js How to cut all files in one folder to another folder
習慣沉默
習慣沉默 2017-06-05 11:13:04
0
1
722

How to cut the files in viewsdev/node_modules, including node_modules, to another directory

  const path = require('path');
  const fs = require('fs');
 let modules = path.join(__dirname,'viewsdev/node_modules');
 let newModules = path.resolve(__dirname,'../../../node_modules');
 fs.rename(modules,newModules,function(err){
    if(err){
       console.log(err) 
    }
})

Using fs.rename will report the error EPERM: operation not permitted node

習慣沉默
習慣沉默

reply all(1)
伊谢尔伦

Is it a permissions issue

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template