Using Low-Level I/O Functions

The Developer's Toolkit compiler supports both stream and low-level I/O. The primary difference between the two types of I/O is that low-level I/O leaves the responsibility of buffering and formatting up to you.

In general, you should not mix input or output from low-level I/O with that from stream I/O. The only way to communicate between stream I/O and low-level I/O is by using the fdopen or fileno functions.

The low-level I/O functions include: ┌─────────────────┬─────────────────┬─────────────────┬─────────────────┐
│ access │ dup2 │ fstat │ _setmode │
│ chmod │ __eof │ isatty │ _sopen │
│ _chsize │ fdopen │ lseek │ stat │
│ close │ _filelength │ open │ _tell │
│ creat │ fileno │ read │ umask │
│ dup │ │ │ write │
└─────────────────┴─────────────────┴─────────────────┴─────────────────┘

When you use the low-level I/O functions, you should be aware of the following: