Is node.js rmdir recursive ? Will it work on non empty directories?

后端 未结 22 1407
清歌不尽
清歌不尽 2021-01-31 13:41

The documentation for fs.rmdir is very short and doesn\'t explain the behavior of rmdir when the directory is not empty.

Q: What happens if I try to use

22条回答
  •  心在旅途
    2021-01-31 13:51

    In addition to the correct "no" answers, the rimraf package provides recursive delete functionality. It mimics rm -rf. It's also officially packaged by Ubuntu.

提交回复
热议问题