MSDotNetBuddy
The blog is to experiment with various technologies.
Search This Blog
2023/05/04
How to delete all content of file
var
fs
=
require
(
'fs'
);
fs
.
truncate
(
'./myfile.txt'
,
0
,
function
() {
console
.
log
(
'File Content Deleted'
)
});
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment