FSResult FS_ARCHIVE_PROC_FUNC(FSFile *p_file, FSCommandType command /*
= FS_COMMAND_OPENFILEFAST */);
Operating specifications for the archive command FS_COMMAND_OPENFILEFAST
are shown below:
This command takes (as a command argument) the variablearg.openfilefast
that is stored atp_file
.
This variable is defined innitro/fs/file.h
as shown below: typedef struct { FSFileID id; } FSOpenFileFastInfo;
Argument content is listed below:
Arguments | Content |
id | The ID of the file to be opened. The FS_COMMAND_READDIR command generates this value. |
It sets thep_file
variable prop.file as shown below: Appropriately sets each of theprop.file
variables, based on the file ID that is defined in theid
argument. The set values are used by subsequentFS_COMMAND_READFILE
andFS_COMMAND_WRITEFILE
commands. You may determine your own meanings for theprop.file
variables as long as they are appropriate arguments for these commands. However,prop.file.pos
must be within the rangeprop.file.top
-prop.file.bottom
.
The command sets values based on the following determinants:
prop.file.top | The area top position that is acquired from the FAT information that the specified file index indicates. (Conforms to NitroROM format.) |
prop.file.bottom | The area bottom position that is acquired from the FAT information that the specified file index indicates. (Conforms to NitroROM format.) |
prop.file.pos | Sets the same value as prop.file.top |
prop.file.own_id | Sets the argument id as is. |
As long as the archive's FAT conforms to the NitroROM format (determined by using the archive read callback function), this information is acquired from the FAT index that is indicated byid.file_id
. TheFS_COMMAND_OPENFILEDIRECT
command is used to make the setting.
If this command returnsFS_RESULT_SUCCESS
,p_file
becomes a handle that contains directory position information. Subsequently theFS_IsDir
function returns TRUE. It can also be used in arguments in functions that operate on files.
FS_OpenFile
FS_OpenFileFast
FSArchive
, FS_ARCHIVE_PROC_FUNC
, FS_COMMAND_*
, FS_SetArchiveProc
2004/07/12 Initial version.
CONFIDENTIAL