-
-
Save froggr/7aba077b0b14db748a07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var f='write.txt', | |
fs=require('fs'); | |
fs.writeFile(f,'Some text to write.',function(err){ | |
if(err) | |
console.error(err); | |
console.log('Written!'); | |
}); | |
fs.appendFile(f,'Some more text to append.',function(err){ | |
if(err) | |
console.error(err); | |
console.log('Appended!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment