187
rated 0 times
[
194]
[
7]
/ answers: 1 / hits: 16666
/ 8 Years ago, mon, october 10, 2016, 12:00:00
I am new to Node.js.
const fs = require('fs');
fs.unlink('/tmp/hello', (err) => {
if (err) throw err;
console.log('successfully deleted /tmp/hello');
});
This is some code that I copied from a node.js document file system intro example.
But, I am confused. Can unlink()
delete a folder or not?
I have tried but it doesn't work.
So, can unlink()
delete a folder or not?
More From » node.js