|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Updated: March 2009
These functions invoke the operating system directly for lower-level operation than that provided by stream I/O. Low-level input and output calls do not buffer or format data.
Low-level routines can access the standard streams opened at program startup using the following predefined file descriptors.
Low-level I/O routines set the errno global variable when an error occurs. You must include STDIO.H when you use low-level functions only if your program requires a constant that is defined in STDIO.H, such as the end-of-file indicator (EOF).
Flush file to disk
Return next available file descriptor for given file
Create second descriptor for given file
Test for end of file
Reposition file pointer to given location
Read data from file
Open file for file sharing
Get current file-pointer position
Set file-permission mask
Write data to file
_dup and _dup2 are typically used to associate the predefined file descriptors with different files.