Japanese
PROGRAMMER'S GUIDEFile system library
BackForward
file system library

8.Function specification-4


8.4 Read with immediate return


 one
View
table
 Title

function specification

 Function

Start loading data

 Function name

GFS_NwFread

 No

4.1

Format
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 request to read data to the server function. When the requested access operation is completed, the access pointer advances by nsct sectors.
remarks
The same precautions as those for GFS_Fread are required regarding buf address boundaries.

 one
View
table
 Title

function specification

 Function

Start reading ahead into CD buffer

 Function name

GFS_NwCdRead

 No

4.2

Format
Sint32 GFS_NwCdRead(GfsHn gfs, Sint32 nsct)
input
 gfs
 : file handle
 nsct
 : Number of sectors to read
output
none
function value
Error code.
function
Issues a read-ahead request to the server function to read data into the CD buffer.
The access pointer does not change upon completion of the requested read process. 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 using the GFS_NwFread function after starting read ahead is complete, perform the following process.
If you read ahead with the GFS_NwCdRead function, you must be careful because you cannot check whether the GFS_NwFread function has completed with the GFS_NwIsComplete function.

 one
View
table
 Title

function specification

 Function

Checking for completion of access operation

 Function name

GFS_NwIsComplete

 No

4.3

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

 one
View
table
 Title

function specification

 Function

Canceling access operation

 Function name

GFS_NwStop

 No

4.4

Format
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
Aborts the access operation of the server function. GFS_NwExecServer continues accessing the next file.

 one
View
table
 Title

function specification

 Function

Get current access status

 Function name

GFS_NwGetStat

 No

4.5

Format
void GFS_NwGetStat(GfsHn gfs, Sint32 *stat, Sint32 *ndata)
input
gfs: file handle
output
 stat
 :Current access status
 data
 :The number of data
function value
none
function
Used to obtain access status of server functions.
The meaning of the data for each access state is shown below.

 access status
 process
 Meaning of number of data
 GFS_NWSTAT_NOACT
 none
 meaningless
 GFS_NWSTAT_FREAD
 Loading from CD to host area
 Number of bytes read into host area
 GFS_NWSTAT_CDREAD
 Read ahead to CD buffer
 Number of sectors read into CD buffer 


 one
View
table
 Title

function specification

 Function

Executing access operations on a file-by-file basis

 Function name

GFS_NwExecOne

 No

4.6

Format
Sint32 GFS_NwExecOne(GfsHn gfs)
input
gfs: file handle
output
none
function value
Execution status (GFS_SVR_~). Negative error code in case of error.
function
This is an access server function for a single file. Performs the following processing according to the most recently called access operation for the file handle.

 one
View
table
 Title

function specification

 Function

Performing multiple file access operations

 Function name

GFS_NwExecServer

 No

4.7

Format
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
This is an access server function for multiple files. Actual access (GFS_NwExecOne) is performed in the order in which requests are issued.
After the access operation for one file is completed, it moves on to the next process.
When processing of multiple files is completed, it becomes GFS_SVR_COMPLETED.

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