HFS Concepts

The HFS APIs work with units of information or objects that belong to existing, hierarchical file systems. A file system is the operating system's method of controlling the format of information on storage media and performing input and output operations to the objects that contain the information. The document library services (DLS) file system is one example of a file system.

The basic units of nonrelational information in a file system are usually called files. Files are sometimes called byte-stream files or stream files because they consist of a stream of bytes with no specific record structure.

A hierarchical file system arranges information units in a multilevel, tree-like structure, as IBM® DOS does. Files are grouped into larger units usually called directories. A directory can contain both files and subordinate directories. A directory contains no data of its own but is simply a named group of files and other directories. Two objects with the same name cannot exist in the same directory, but one directory can contain directories or files with the same names as those in another directory.

HFS Directory--Scenario: The following diagram illustrates the structure of a hierarchical directory:

Structure of a hierarchical directory

In the preceding diagram, the topmost directory, DIRA, contains both directories, DIRB and DIRD, and files, FILEW and FILEX. Directory DIRD contains only files. Directory DIRB contains only directories. In this structure, there are two directories named DIRD, one in directory DIRA and one in directory DIRA/DIRB. There are also three files named FILEX, one in directory DIRA, one in DIRA/DIRD, and one in DIRA/DIRB/DIRC.

The specific location and name of a file or directory are represented in a multipart name called a path name. A path name starts with a slash (/) and consists of elements separated by slashes. The first element of the path name is the name of the file system. The remaining elements specify the applicable directory and file names; the last element can be either a file or a directory, but the rest must be directories.

HFS Path Name--Example: The path name /QDLS/DIRA/FILEW refers to file FILEW in directory DIRA in file system QDLS.

Optical Path Name--Example: The path name /QOPT/VOL1/DIR1/FILEA refers to file FILEA in directory DIR1 on volume VOL1 in file system QOPT.

Note: The optical file system requires an optical volume name following the file system name in the path.


[ Back to top | Hierarchical File System APIs | APIs by category ]