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_FINDPATH</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">FS_COMMAND_FINDPATH <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_FINDPATH */);<br> 22 </CODE><br> 23 </dd> 24</dl> 25 26<H2>Description</H2> 27<P>Operating specifications for the archive command <code>FS_COMMAND_FINDPATH</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.closefile</code> that is stored in <code>p_file</code>. 33This variable is defined in <code>nitro/fs/file.h</code> as shown below: 34 35typedef struct 36{ 37 <a href="../fs_dir_pos_type.html">FSDirPos</a> pos; 38 const char *path; 39 BOOL find_directory; 40 union { 41 <a href="../fs_file_id_type.html">FSFileID</a> *file; 42 <a href="../fs_dir_pos_type.html">FSDirPos</a> *dir; 43 } result; 44} FSFindPathInfo;</code> </PRE> 45</BLOCKQUOTE> 46<BLOCKQUOTE>Argument content is listed below: 47</BLOCKQUOTE> 48<CENTER> 49<TABLE border="1" width="50%"> 50 <TBODY> 51 <TR> 52 <TD style="text-align : center;" width="95">Arguments</TD> 53 <TD style="text-align : center;" width="522">Content</TD> 54 </TR> 55 <TR> 56 <TD width="95" style="text-align : center;">pos</TD> 57 <TD width="522">This indicates the base directory position of the file or directory that is to be searched. 58 The following variables can be ignored: <code>pos.index</code>, <code>pos.pos</code>.</TD> 59 </TR> 60 <TR> 61 <TD style="text-align : center;">path</TD> 62 <TD>Indicates a pointer to a relative path string, where <code>pos</code> is the base.</TD> 63 </TR> 64 <TR> 65 <TD style="text-align : center;"><code><EM><STRONG>find_directory</STRONG></EM></code></TD> 66 <TD>If the target of the search is a file, this argument stores <code>FALSE</code>; if the target is a directory, this argument stores <code>TRUE</code>.</TD> 67 </TR> 68 <TR> 69 <TD style="text-align : center;"><code><EM><STRONG>result.file</STRONG></EM></code></TD> 70 <TD>If <code>find_directory</code> is <code>FALSE</code>, this argument indicates a pointer to a file ID that is used to store search results.</TD> 71 </TR> 72 <TR> 73 <TD style="text-align : center;"><code><EM><STRONG>result.dir</STRONG></EM></code></TD> 74 <TD>If <code>find_directory</code> is <code>TRUE</code>, this will indicate a pointer to a directory position that is used to store search results.</TD> 75 </TR> 76 </TBODY> 77</TABLE> 78</CENTER> 79<BR> 80<HR> 81<B>Actions required of this command</B> 82<BLOCKQUOTE> 83<PRE><code>p_file</code> information does not use anything. 84The memory that the arguments <code>result.file</code> and <code>result.dir</code> indicate is set as shown below: 85 86If the <code>find_directory</code> argument is FALSE, based on the directory position <code>pos</code>, 87 the command will acquire the file ID that is at the relative path position that is indicated by path, and store the value in <code>result.file</code>. 88 89If the find_directory argument is TRUE, based on the directory position <code>pos</code>, 90 the command will acquire the directory position that is at the relative path position that is indicated by <code>path</code>, and store the value in <code>result.dir</code>. 91 92In either case, the command will do nothing if the specified path is invalid.</PRE> 93</BLOCKQUOTE> 94<HR> 95<B>Default Implementation</B> 96<BLOCKQUOTE>Seek results from the provided arguments, using only the <code><a href="fs_command_seekdir_spec.html">FS_COMMAND_SEEKDIR</a></code> and <code><a href="fs_command_readdir_spec.html">FS_COMMAND_READDIR</a></code> commands.</BLOCKQUOTE> 97<HR> 98<B>Command Results</B><BR> 99 100<BLOCKQUOTE> 101<PRE>If <code>FS_RESULT_SUCCESS</code> is returned by the command, it will be determined that correct values, found as search results, are stored in <code>result.file</code> or <code>result.dir</code>. 102 103Otherwise, it will be determined that the command failed either because the specified path does not exist, the path format is invalid, or due to some other error. 104 105</PRE> 106</BLOCKQUOTE> 107<HR> 108<B>Functions that use this command</B><BR> 109<BLOCKQUOTE><code>FS_ChangeDir</code> <BR><code>FS_OpenFile</code> <BR><code>FS_ConvertPathToFileID</code></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