Title | Function | Function Name | No |
format Bool GFS_IsEof (GfsHngfs) Input gfs: File handle Output None Function value File end flag. Function Checks whether the access pointer has reached the end of the file. function The value has the following meaning: TRUE: The end of the file has been reached. FALSE: The end of the file has not been reached. : If an invalid file handle is entered, it is considered that the end of the file has been reached. .
Title | Function | Function Name | No |
format Sint32 GFS_ByteToSct (GfsHngfs, Sint32 nbyte) Input gfs: File handle nbyte: number of bytes Output None Function value Number of sectors. Negative error code on error. Function Converts units from bytes to sectors (nsct). The sector unit length nsct is calculated as follows: Calculated using the formula .nsct = (nbyte + file sector length-1) / file sector length;
If the sector length is indefinite (mixed Form1 and Form2), 0 is the function value.
Title | Function | Function Name | No |
format void GFS_GetFileSize (GfsHngfs, Sint32 * sctsize, Sint32 * nsct, S * lastsize) Input gfs: File handle Output sctsize: Sector length nsct: Number of sectors (excluding the last sector) last lastsize: number of bytes occupied by file data in the last sector Function value None Function Acquires information for determining the file size. sctsize, nsct, lastsize If NULL is specified for . , output of the information can be suppressed. The file size (fsize) can be calculated using the following formula.fsize = sctsize * (nsct-1) + lastsize;
Remarks When the lastsize is 2048 bytes in the form2 file, 2324 bytes in the last sector must be processed as containing data.