How optical files are used

An application can manipulate optical file data by using UNIX-type APIs or the hierarchical file system (HFS).

An application opens a file, operates on the file, and finally closes the file. When an application changes file data or attributes, the optical file system stores these changes in a temporary system object in IBM® i storage. The optical file system does not update the optical disk until the application closes the file. When two or more applications concurrently change file data or attributes, the optical file system updates the optical disk when the last updating application closes the file. The application may force file and attribute data to optical disk by issuing either the HFS Force Buffered Data API or UNIX-Type fsync() functions.

Doing this process has the following benefits: