Chapter 8Working with Files
All the programs you’ve worked with so far have taken input from the end user or used hard-coded values. But many programs use files to store data. Your operating system and its programs write logs to files constantly, as do the websites you visit. And many apps use files to hold configuration data. Games use files to store your saved data when you reach a checkpoint.
Even programming languages, like the one you’re using to work through this book, work with files. You type your source code into a file, and a compiler or interpreter turns what you wrote into something the computer can run.
The exercises in this chapter ask you to work with files and folders, and you’ll need to investigate how to do this in your programming ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access