Oracle® Solaris 11.2 Programming Interfaces Guide

Exit Print View

Updated: July 2014
 
 

Files and I/O Interfaces

Files that are organized as a sequence of data are called regular files. Regular files can contain ASCII text, text in some other binary data encoding, executable code, or any combination of text, data, and code.

A regular file is made up of the following components:

  • Control data, which is called the inode. This data includes the file type, the access permissions, the owner, the file size, and the location of the data blocks.

  • File contents: a nonterminated sequence of bytes.

The Oracle Solaris operating system provides the following basic forms of file input/output interfaces:

  • The traditional, raw style of file I/O is described in Basic File I/O.

  • The standard I/O buffering provides an easier interface and improved efficiency to an application run on a system without virtual memory. In an application running in a virtual memory environment, such as on the SunOS operating system, standard file I/O is outdated.

  • The memory mapping interface is described in Memory Management Interfaces. Mapping files is the most efficient form of file I/O for most applications run under the SunOS platform.