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_OPENFILEDIRECT</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">FS_COMMAND_OPENFILEDIRECT <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_OPENFILEDIRECT */);<br> 22 </CODE><br> 23 </dd> 24</dl> 25 26<H2>Description</H2> 27<P>Operating specifications for the archive command <code>FS_COMMAND_OPENFILEDIRECT</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.openfiledirect</code> that is stored at <code>p_file</code>. 33This variable is defined in <code>nitro/fs/file.h</code> as shown below: 34 35typedef struct 36{ 37 u32 top; 38 u32 bottom; 39 u32 index; 40} FSOpenFileDirectInfo;</code></PRE> 41</BLOCKQUOTE> 42<BLOCKQUOTE>Argument content is listed below: 43</BLOCKQUOTE> 44<CENTER> 45<TABLE border="1" width="50%"> 46 <TBODY> 47 <TR> 48 <TD style="text-align : center;" width="95">Arguments</TD> 49 <TD style="text-align : center;" width="522">Content</TD> 50 </TR> 51 <TR> 52 <TD width="95" style="text-align : center;">top</TD> 53 <TD width="522">An archive base offset that indicates the top of the file image area.<br /> 54 This value is used for area determination in the <code><a href="../file/FS_SeekFile.html">FS_SeekFile</a></code> function.</TD> 55 </TR> 56 <TR> 57 <TD style="text-align : center;">bottom</TD> 58 <TD>An archive base offset that indicates the bottom of the file image area.<br /> 59 This value is used for area determination in the <code><a href="../file/FS_SeekFile.html">FS_SeekFile</a></code> function.</TD> 60 </TR> 61 <TR> 62 <TD style="text-align : center;">index</TD> 63 <TD>Indicates a file's index.<br /> 64 This value is used by the <code><a href="fs_command_getpath_spec.html">FS_COMMAND_GETPATH</a></code> command.</TD> 65 </TR> 66 </TBODY> 67</TABLE> 68</CENTER> 69<BR> 70<HR> 71<B>Actions required of this command</B> 72<BLOCKQUOTE> 73<PRE>It sets the <code>p_file</code> variable prop.file as shown below: 74 75Each of the <code>prop.file</code> variables is appropriately set based on the arguments <code>top</code>, <code>bottom</code>, and <code>index</code>. 76 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. 77 You may determine your own meanings for the <code>prop.file</code> variables as long as they are appropriate arguments for these commands. 78 However, <code>prop.file.pos</code> must be within the range <code>prop.file.top</code> - <code>prop.file.bottom</code>.</PRE> 79</BLOCKQUOTE> 80<HR> 81<B>Default Implementation</B> 82<BLOCKQUOTE>The command sets values based on the following determinants: 83</BLOCKQUOTE> 84<CENTER> 85<TABLE border="1"> 86 <TBODY> 87 <TR> 88 <TD width="185">prop.file.top</TD> 89 <TD width="432">Sets the argument <code>top</code> as is.</TD> 90 </TR> 91 <TR> 92 <TD width="185">prop.file.bottom</TD> 93 <TD width="432">Sets the argument <code>bottom</code> as is.</TD> 94 </TR> 95 <TR> 96 <TD width="185">prop.file.pos</TD> 97 <TD width="432">Sets the same value as <code>prop.file.top</code></TD> 98 </TR> 99 <TR> 100 <TD width="185">prop.file.own_id</TD> 101 <TD width="432">Sets the arguments <code>index</code> and <code>p_file->arc</code>.</TD> 102 </TR> 103 </TBODY> 104</TABLE> 105</CENTER> 106<BR> 107<HR> 108<B>Command Results</B><BR> 109 110<BLOCKQUOTE> 111<PRE>If this command returns <code>FS_RESULT_SUCCESS</code>, <code>p_file</code> becomes a handle that contains directory position information. 112Subsequently the <code>FS_IsDir</code> function returns TRUE. 113It can also be used in arguments in functions that operate on files.</PRE> 114</BLOCKQUOTE> 115<HR> 116<B>Functions that use this command</B><BR> 117<BLOCKQUOTE><code><a href="../file/FS_OpenFileDirect.html">FS_OpenFileDirect</a></code> (indirectly from the default <code><a href="../file/FS_OpenFileFast.html">FS_OPENFILEFAST</a></code> command) <BR><code>FS_OpenFile</code> <BR><code>FS_OpenFileFast</code> 118</BLOCKQUOTE> 119<h2>See Also</h2> 120<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> 121 122<H2>Revision History</H2> 123<P> 1242004/08/25 Fixed error: <code>FS_COMMAND_WRITE</code> changed to <code>FS_COMMAND_WRITEFILE</code>.<br> 2004/07/12 Initial version. 125</P> 126<hr><p>CONFIDENTIAL</p></body> 127</html> 128