The One with the Filesystem Chronicles
File Systems and IO
Computers are incredible machines, but they have one downside. If the power goes off, they forget everything. If we do not want to lose our work, we must store it elsewhere. We can print data, put it on the network, or store it in permanent storage. This is the most common option. Of course, we need to have a way to get data into the CPU. We can read data from a file or a network. We can even use the keyboard to enter data. This is something that both you (a programmer) and I (a writer) are very familiar with.
When we are programming software, we refer to the concept of streams. A stream represents a sequence of data elements made available over time. This sequence can be stored on a disk, it can be data flowing over network wires, or it can be the state of a memory chip. Data must flow back and forth no matter what physical medium we use. This chapter handles that topic, covering streams, files, and other ways of Input...