1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>FS_COMMAND_OPENFILEFAST</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">FS_COMMAND_OPENFILEFAST <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1> 15<h2>Definition</h2> 16 17<dl> 18 <dd> 19 <BR> 20 <CODE>FSResult FS_ARCHIVE_PROC_FUNC(FSFile *p_file, FSCommandType command /* 21 = FS_COMMAND_OPENFILEFAST */);<br> 22 </CODE><br> 23 </dd> 24</dl> 25 26<H2>Description</H2> 27<P>Operating specifications for the archive command <code>FS_COMMAND_OPENFILEFAST</code> are shown below: <BR> <BR> 28 29<HR> 30<B>Arguments passed to this command</B> 31<BLOCKQUOTE> 32<PRE>This command takes (as a command argument) the variable <code>arg.openfilefast</code> that is stored at <code>p_file</code>.<br /> 33This variable is defined in <code>nitro/fs/file.h</code> as shown below: 34 35typedef struct 36{ 37 <a href="../fs_file_id_type.html">FSFileID</a> id; 38} FSOpenFileFastInfo;</code> 39</PRE> 40</BLOCKQUOTE> 41<BLOCKQUOTE>Argument content is listed below: 42</BLOCKQUOTE> 43<CENTER> 44<TABLE border="1" width="50%"> 45 <TBODY> 46 <TR> 47 <TD style="text-align : center;" width="95">Arguments</TD> 48 <TD style="text-align : center;" width="522">Content</TD> 49 </TR> 50 <TR> 51 <TD width="95" style="text-align : center;">id</TD> 52 <TD width="522">The ID of the file to be opened.<br /> 53 The <code><a href="fs_command_readdir_spec.html">FS_COMMAND_READDIR</a></code> command generates this value.</TD> 54 </TR> 55 </TBODY> 56</TABLE> 57</CENTER> 58<BR> 59<HR> 60<B>Actions required of this command</B> 61<BLOCKQUOTE> 62<PRE>It sets the <code>p_file</code> variable prop.file as shown below: 63 64Appropriately sets each of the <code>prop.file</code> variables, based on the file ID that is defined in the <code>id</code> argument. 65 The set values are used by subsequent <code><a href="fs_command_readfile_spec.html">FS_COMMAND_READFILE</a></code> and <code><a href="fs_command_writefile_spec.html">FS_COMMAND_WRITEFILE</a></code> commands. 66 You may determine your own meanings for the <code>prop.file</code> variables as long as they are appropriate arguments for these commands. 67 However, <code>prop.file.pos</code> must be within the range <code>prop.file.top</code> - <code>prop.file.bottom</code>. 68</PRE> 69</BLOCKQUOTE> 70<HR> 71<B>Default Implementation</B> 72<BLOCKQUOTE>The command sets values based on the following determinants: 73</BLOCKQUOTE> 74<CENTER> 75<TABLE border="1"> 76 <TBODY> 77 <TR> 78 <TD width="185">prop.file.top</TD> 79 <TD width="432">The area top position that is acquired from the FAT information that the specified file index indicates.<br /> (Conforms to NitroROM format.)</TD> 80 </TR> 81 <TR> 82 <TD width="185">prop.file.bottom</TD> 83 <TD width="432">The area bottom position that is acquired from the FAT information that the specified file index indicates.<br /> (Conforms to NitroROM format.)</TD> 84 </TR> 85 <TR> 86 <TD width="185">prop.file.pos</TD> 87 <TD width="432">Sets the same value as <code>prop.file.top</code></TD> 88 </TR> 89 <TR> 90 <TD width="185">prop.file.own_id</TD> 91 <TD width="432">Sets the argument <code>id</code> as is.</TD> 92 </TR> 93 </TBODY> 94</TABLE> 95</CENTER> 96<BLOCKQUOTE>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 by <code>id.file_id</code>. The <code><a href="fs_command_openfiledirect_spec.html">FS_COMMAND_OPENFILEDIRECT</a></code> command is used to make the setting. 97</BLOCKQUOTE> 98<HR> 99<B>Command Results</B><BR> 100 101<BLOCKQUOTE> 102<PRE>If this command returns <code>FS_RESULT_SUCCESS</code>, <code>p_file</code> becomes a handle that contains directory position information. 103Subsequently the <code>FS_IsDir</code> function returns TRUE. 104It can also be used in arguments in functions that operate on files.</PRE> 105</BLOCKQUOTE> 106<HR> 107<B>Functions that use this command</B><BR> 108<BLOCKQUOTE>FS_OpenFile<BR>FS_OpenFileFast 109</BLOCKQUOTE> 110<h2>See Also</h2> 111<p><code><a href="../fs_archive_type.html">FSArchive</a></code>, <code><a href="../fs_archive_proc_func_type.html">FS_ARCHIVE_PROC_FUNC</a></code>, <code><a href="../fs_command_type_const.html">FS_COMMAND_*</a></code>, <code><a href="../archive/FS_SetArchiveProc.html">FS_SetArchiveProc</a></code></p> 112 113<H2>Revision History</H2> 114<P>2004/07/12 Initial version.</P> 115<hr><p>CONFIDENTIAL</p></body> 116</html> 117