File Input and Output
Files stored on disk drives allow our programs to persist data across executions, enabling us to develop potent tools to help us get our daily work done. In addition, we can treat files as both text and binary data. We will explore the advantages of using both methods. We will also think about organizing the files we use in our programs in directories.
In this chapter, we’re going to cover the following main topics:
- Working with directories and files
- Writing text to files
- Writing binary data to files
- Reading text from files
- Reading binary data from files