Created
September 26, 2022 18:01
-
-
Save nairihar/6cac9a5a2d1368ad1a14997fab7b0741 to your computer and use it in GitHub Desktop.
Three ways to work with File System in Node.js | Sync functions
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
const fs = require('fs'); | |
const data = fs.readFileSync('LICENSE.md'); | |
try { | |
fs.writeFileSync('README.md', 'This is awesome!'); | |
} catch (err) { | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment