FSResult FS_ARCHIVE_PROC_FUNC(FSFile *p_file, FSCommandType command /*
= FS_COMMAND_OPENFILEDIRECT */);
Operating specifications for the archive command FS_COMMAND_OPENFILEDIRECT
are shown below:
This command takes as a command argument the variablearg.openfiledirect
that is stored atp_file
. This variable is defined innitro/fs/file.h
as shown below: typedef struct { u32 top; u32 bottom; u32 index; } FSOpenFileDirectInfo;
Argument content is listed below:
Arguments | Content |
top | An archive base offset that indicates the top of the file image area. This value is used for area determination in the FS_SeekFile function. |
bottom | An archive base offset that indicates the bottom of the file image area. This value is used for area determination in the FS_SeekFile function. |
index | Indicates a file's index. This value is used by the FS_COMMAND_GETPATH command. |
It sets thep_file
variable prop.file as shown below: Each of theprop.file
variables is appropriately set based on the argumentstop
,bottom
, andindex
. 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 | Sets the argument top as is. |
prop.file.bottom | Sets the argument bottom as is. |
prop.file.pos | Sets the same value as prop.file.top |
prop.file.own_id | Sets the arguments index and p_file->arc . |
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_OpenFileDirect
(indirectly from the defaultFS_OPENFILEFAST
command)FS_OpenFile
FS_OpenFileFast
FSArchive
, FS_ARCHIVE_PROC_FUNC
, FS_COMMAND_*
, FS_SetArchiveProc
2004/08/25 Fixed error: FS_COMMAND_WRITE
changed to FS_COMMAND_WRITEFILE
.
2004/07/12 Initial version.
CONFIDENTIAL