Why is rimraf.sync not good?
elgs opened this issue · 2 comments
elgs commented
You mentioned:
It can remove stuff synchronously, too. But that's not so good. Use the async API. It's better.
I wonder why? Is there any real danger to use the sync API? Thanks.
KCGD commented
I would say the reason it could be bad is that its harder to error handle sync functions, but ive been using rimraf.sync for a while and haven't encountered any real errors, just make sure you don't delete the wrong directory
elgs commented
It seems nodejs's fs has an api called rmdirSync which experimentally supports recursive option.