Hierarchical file system and optical device programming

A hierarchical file system (HFS) is a part of the operating system that includes the application programming interface (API) and the underlying file system (optical or otherwise) support.

The HFS API makes it possible for an application that is written in a high-level language to create, store, retrieve, and manipulate data on a directly attached optical library device, LAN-attached optical library device, CD-ROM, or DVD device.

HFS API optical support consists of two parts:
  • An application programming call interface to the hierarchical file system to manipulate objects known as files and directories.
  • An optical or other registered file system that manages the storage devices where the files and directories are stored.
HFS API optical functions include the following items:
  • Creating or deleting a directory
  • Opening, reading, or closing a directory
  • Opening, reading, writing, or closing a file
  • Locking or unlocking bytes in a file
  • Getting or setting the size of a file
  • Renaming, copying, deleting, or removing a file
  • Retrieving or changing directory entry attributes

Applications use HFS APIs to manage stream files on an IBM® i system. These stream files are also called objects to identify them as data elements that do not have a conventional record structure. The object is treated as a named byte stream of known length, whose size can vary from a few bytes to megabytes.

HFS APIs allow applications to create and manage file objects on storage devices and to perform input/output operations to those file objects. HFS APIs allow applications to create and manage directory objects, which can be thought of as a logical grouping of similar file objects. These directory objects contain information about the file objects that belong to that directory. Directories can be contained within directories resulting in the hierarchical structure.