Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs fs create file if not exists

fs.exists(filename, function(exists) {
  if(exists) {
    // Create a file
  }
  else {
    console.log("Deny overwrite existing", filename);
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #nodejs #fs #create #file #exists
ADD COMMENT
Topic
Name
1+7 =