Copy folder recursively in Node.js

前端 未结 25 1807
隐瞒了意图╮
隐瞒了意图╮ 2020-12-04 07:44

Is there an easier way to copy a folder and all its content without manually doing a sequence of fs.readir, fs.readfile, fs.writefile

相关标签:
25条回答
  • 2020-12-04 08:33

    ncp locks the file descriptor and fires a callback when it hasn't been unlocked yet.

    I recommend to use the recursive-copy module instead. It supports events and you can be sure in the copy ending.

    0 讨论(0)
提交回复
热议问题