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.openfiledirectthat is stored atp_file. This variable is defined innitro/fs/file.has 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_filevariable prop.file as shown below: Each of theprop.filevariables is appropriately set based on the argumentstop,bottom, andindex. The set values are used by subsequentFS_COMMAND_READFILEandFS_COMMAND_WRITEFILEcommands. You may determine your own meanings for theprop.filevariables as long as they are appropriate arguments for these commands. However,prop.file.posmust 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 returns FS_RESULT_SUCCESS, p_file becomes a handle that contains directory position information. Subsequently theFS_IsDirfunction returns TRUE. It can also be used in arguments in functions that operate on files.
FS_OpenFileDirect(indirectly from the defaultFS_OPENFILEFASTcommand)FS_OpenFileFS_OpenFileFast
FSArchive, FS_ARCHIVE_PROC_FUNC, FS_COMMAND_*, FS_SetArchiveProc
08/25/2004 Fixed error: FS_COMMAND_WRITE changed to FS_COMMAND_WRITEFILE.
07/12/2004 Initial version.
CONFIDENTIAL