Stream is an abstract concept.
Files in the computer are mainly used to store a large amount of data and can be stored in a variety of auxiliary memory. Common files include disks (floppy disks and hard disks), CDS (CDROM and DVDs), and USB disks. Unlike the data in the memory, the file data stored in the secondary storage will not be lost even if the power is down.
The file itself consists of 0 and 1 binary numbers, and 8 binary bits (BIT) constitute a byte, which is the minimum unit of file storage.
No matter what data is stored in the file, the computer can regard it as a binary byte stream.
All operations on the file content are reflected in the two operations of reading and writing the binary data. The binary data stored in a file is ordered. from the beginning to the end of the file, the sequence cannot be changed at will, just like the water in a small stream. It is impossible to roll back. Therefore, in software, files are often seen as a "stream" of data, represented by the concept of "file stream.