PROGRAMMER'S GUIDEFile system library
BackForward
File system library

8. Function specifications-4


8.4 Immediate return type read


 List
 Title

Function specifications

 Function

Start reading data

 Function Name

GFS_NwFread

 No

4.1

Form
Sint32 GFS_NwFread (GfsHn gfs, Sint32 nsct, void * buf, Sint32 bsize)
input
 gfs
 : File handle
 nsct
 : Number of sectors to read
 bsize
 : Size of read area (unit: number of bytes)
output
buf: Read area
Function value
Error code.
function
Issue a data read request to the server function. When the requested access operation is complete, the access pointer advances the nsct sector.
remarks
As for the address boundary of buf, the same precautions as the remarks of GFS_Fread are required.

 List
 Title

Function specifications

 Function

Start look-ahead to CD buffer

 Function Name

GFS_NwCdRead

 No

4.2

Form
Sint32 GFS_NwCdRead (GfsHn gfs, Sint32 nsct)
input
 gfs
 : File handle
 nsct
 : Number of sectors to read
output
none
Function value
Error code.
function
Issue a read-ahead request to the data CD buffer for the server function.
The access pointer does not change when the requested read process is completed. If the following conditions are not met, the access operation for the specified file handle will not be completed.
remarks
To check that the transfer to the host area by the GFS_NwFread function after the start of read-ahead is completed, perform the following processing.
Note that if you read ahead with the GFS_NwCdRead function, you cannot check the completion of the GFS_NwFread function with the GFS_NwIsComplete function.

 List
 Title

Function specifications

 Function

Checking the completion of access operation

 Function Name

GFS_NwIsComplete

 No

4.3

Form
Bool GFS_NwIsComplete (GfsHn gfs)
input
gfs: file handle
output
none
Function value
Access operation status.
function
Check if the access operation of the server function is completed. Function values have the following meanings:
 TRUE
 : Access completed
 FALSE
 :in action 

 List
 Title

Function specifications

 Function

Stop access operation

 Function Name

GFS_NwStop

 No

4.4

Form
Sint32 GFS_NwStop (GfsHn gfs)
input
gfs: file handle
output
none
Function value
Access pointer at the time of cancellation. Negative error code in case of error.
function
Cancels the access operation of the server function. GFS_NwExecServer continues to access the following files:

 List
 Title

Function specifications

 Function

Get current access status

 Function Name

GFS_NwGetStat

 No

4.5

Form
void GFS_NwGetStat (GfsHn gfs, Sint32 * stat, Sint32 * ndata)
input
gfs: File handle
output
 stat
 : Current access status
 ndata
 :The number of data
Function value
none
function
It is used to get the access status of the server function.
The meaning of the data for each access status is shown below.

 Access status
 process
 Meaning of the number of data
 GFS_NWSTAT_NOACT
 none
 No meaning
 GFS_NWSTAT_FREAD
 Reading from CD to host area
 Number of bytes read into host area
 GFS_NWSTAT_CDREAD
 Look-ahead to CD buffer
 Number of sectors read into the CD buffer 


 List
 Title

Function specifications

 Function

Execution of access operation on a file-by-file basis

 Function Name

GFS_NwExecOne

 No

4.6

Form
Sint32 GFS_NwExecOne (GfsHn gfs)
input
gfs: file handle
output
none
Function value
Execution state (GFS_SVR_ ~). Negative error code in case of error.
function
Access server function for a single file. The following processing is executed according to the access operation called immediately before for the file handle.

 List
 Title

Function specifications

 Function

Performing multiple file access actions

 Function Name

GFS_NwExecServer

 No

4.7

Form
Sint32GFS_NwExecServer (GfsHn * now_gfs)
input
none
output
now_gfs: File handle to be executed
Function value
Access server status (GFS_SVR_ ~). Negative error code in case of error.
function
Access server function for multiple files. Performs actual access (GFS_NwExecOne) in the order in which the requests are issued.
After the access operation of one file is completed, the next process is started.
When the processing of multiple files is completed, it becomes GFS_SVR_COMPLETED.

BackForward
PROGRAMMER'S GUIDEFile system library
Copyright SEGA ENTERPRISES, LTD., 1997