Created
January 19, 2020 19:22
-
-
Save debonx/7f42746c53f0523254b6e67b82f16c61 to your computer and use it in GitHub Desktop.
Node: Filesystem core module.
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'); | |
let readDataCallback = (err, data) => { | |
if (err) { | |
console.log(`Something went wrong: ${err}`); | |
} else { | |
console.log(`Provided file contained: ${data}`); | |
} | |
}; | |
fs.readFile('./finalFile.txt', 'utf-8', readDataCallback); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment