Return to previous page Return to menu Go to next page

3.5 CD block file system

Directories can be managed using the CD block file system (file system built into the CD block; hereinafter abbreviated as CDBFS).
The process for initializing, reading directory information, and setting the current directory using CDBFS is shown below.

(1) Initialization

To use the CDBFS function, you must call GFS_Init with NULL as the pointer to the directory management structure. After GFS_Init processing is completed, the root directory is set in CDBFS.

(2) Read directory information

To read the subdirectory information, specify GNULL_LoadDir with NULL as the pointer to the directory management structure, and specify that the directory information storage location is in the CD block.

(3) Current directory setting

To set the directory information set in the CD block to the current directory, call GFS_SetDir with NULL specified as the pointer to the directory management structure.

∙ Even if the setting to use CDBFS is performed, directory management can be partially performed with this library. In that case, you should always be careful about which directory management function you are using.
The advantages and disadvantages of using CDBFS are shown in Table 3.1.

Table 3.1 Pros and cons of using CDBFS
 Advantages 
 Disadvantages 
-Host memory usage is low. 
-CD-ROM access occurs 
every time a file in a different directory is accessed.
 
-The CD buffer that the application can use is reduced by one section. 
 
-The file name cannot be used. 

The functions GFS_Init and GFS_LoadDir that read directory information return the number of directory information read as function values. When using CDBFS, the number is the number of directory information stored in CDBFS.
∙ An error will occur if the file name is used when the CDBFS current directory is set.


Return to previous page Return to menu Go to next page