Using forced buffered data APIs

Read about using the QHFFRCSF or fscync() APIs to write optical file data to nonvolatile media while writing to optical media.

When creating or updating optical files, the data is not guaranteed to exist on optical disk until the file is successfully closed. Optical file data can, however, be synchronously written to nonvolatile storage using either the HFS API Force Buffered Data (QHFFRCSF) or the fsync() UNIX-type API. The type of nonvolatile storage is different depending on the optical media format.

For the High Performance Optical File System (HPOFS), all file data will be written to the internal disk storage. The data can then be recovered through a held optical file if a power loss or other unexpected error occurred which prevented the file from being closed.

For Universal Disk Format (UDF), all file data will be written to the optical disk when a force operation is issued. No recovery is required if a power loss or other unexpected error occurs, which prevents the file from being closed. However, if write operations are issued after the data is forced and the close operation is never successful, the file data is unpredictable. Because the write operations that follow the force operation are asynchronous, the data might not be written to the optical disc.