Created
March 10, 2018 11:27
-
-
Save HenriBeck/7eedbec84f1ed954401f85065c7250c3 to your computer and use it in GitHub Desktop.
Schreiben und Lesen von Dateien
This file contains hidden or 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
// Importieren des FileSystem module | |
const fs = require('fs'); | |
// Zum lesen einer Datei: | |
const datei = fs.readFileSync(pfad, 'utf-8'); | |
// Zum schreiben in eine Datei: | |
// Hierbei wird die komplette Datei überschrieben! | |
fs.writeFileSync(pfad, neuerContent, 'utf-8'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment