For record-oriented input/output, the RecordFile class plays approximately the same role as the java.io.File class for normal Java I/O. It defines the objects of the basic file system(s), in other words normally files and directories.
Unlike with the java.io.File class, different file systems are actually supported by the RecordFile class and not just one. Consequently a RecordFile object always consists of a path name (file or directory name) and an associated file system (DMS, UFS, ...).
Thus there can be objects with the same name, especially in different file systems. In BS2000 it is perfectly conceivable that a file named HALLO can exist both in UFS (Posix file system), in DMS (BS2000 file system) and also in LMS (as a member of a PLAM library). This approach consequently reflects the actual situation in BS2000 better than the monolithic approach of java.io.File (see section "File systems").
The RecordFile class (like java.io.File, too) provides methods and fields for analyzing and transforming the path name. These may be defined differently for each supported file system. For these operations it is normally unimportant whether the file system actually contains a file or directory with the name in question, because recourse is generally not made to the basic file system.
In addition, the RecordFile class also provides methods for accessing, and possibly modifying, the attributes of existing files and directories.
Furthermore, with the RecordFile class methods are provided for performing typical file system operations. These include renaming and deleting existing files and directories, creating files and directories which do not yet exist, and listing directory contents.
All methods which actually access the file system should be subject to the restrictions of the active Security Manager and trigger corresponding exceptions when access to the file system is restricted (see section "Security").
In the sections below the particular features relating to the UFS file system are generally not referred to. In these cases what applies for java.io.File for the Unix file system also applies for the UFS file system.