Optical device programming concepts

You can manipulate optical files and directories by using either integrated file system support or hierarchical file system (HFS) support. Programming for optical devices can be easier if you understand volume, directory, and file considerations.

Two categories of APIs can be used to manipulate optical files and directories:
  • Integrated file system support, which consists of UNIX-type APIs and the generic command interface
  • Hierarchical file system (HFS) support, which consists of APIs and generic commands.

You can use both categories of APIs concurrently. For example, an optical file that is opened for reading by one application by using the HFS Open Stream File API can be opened for reading by another application using the Open UNIX-type API.

Because different file systems exist in IBM® i, you must provide some means for the HFS or the integrated file system to differentiate for which file system a call is targeted. This is accomplished by requiring that the first name in the path name parameter be the name of the file system to be called, preceded by a leading slash. In order for the optical file system to be identified as the receiver of a request submitted to the HFS or the integrated file system, the first portion of the path name parameter must be /QOPT. The remaining path elements to follow /QOPT are volume/directory/subdirectory/file. See the following example for a path name:

/QOPT/CD001/Dir1/SubDir1/File