adspace
How will you truncate a file using node?
Answer Posted / Swati
To truncate (clear) a file in Node.js, you can use the `fs.truncate()` method:n```javascriptnfs.truncate('file_path', 0, function(err){...});```
Post New Answer View All Answers
Is node js losing popularity?
589
How we can read a file in node js?
568