Skip to content

11 Input/Output Overview

1、I/O on Streams

NOTE:

stream-based IO

2、Low-Level I/O

NOTE:

file-descriptor-based-IO

3、File System Interface

4、Pipes and FIFOs

5、Sockets

6、Low-Level Terminal Interface

11.1 Input/Output Concepts

Before you can read or write the contents of a file, you must establish a connection or communications channel to the file. This process is called opening the file. You can open a file for reading, writing, or both.

NOTE:

connection to file

The connection to an open file is represented either as a stream or as a file descriptor.