Level 1M12Lesson 12.2

beginner50 minby DevFox

Reading and writing files: readFile and writeFile

Save TaskKit’s tasks to a file and read them back on the next run. Write text to a file with writeFile, read it back with readFile and “utf8”, see why a missing file stops the first run with ENOENT and how existsSync prevents it, and give TaskKit a store.ts so a task added today is still on the list tomorrow.

  • Fundamentals
  • TypeScript
Reading and writing files: `readFile` and `writeFile`. Read this lesson at .