<?xml version="1.0" encoding="Shift_JIS"?>
<?xml-stylesheet type="text/xsl" href="../Fmethod_xsl/fmethod_he_c.xsl"?>
<root>
  <func>


    <title>cnc_dtsvrdpgdir</title>



    <declare>
      <vc>
        <include>#include "fwlib32.h"</include>
        <prottype>FWLIBAPI short WINAPI cnc_dtsvrdpgdir(unsigned short FlibHndl, char *nc_file,short number,ODBDSDIR *dsdir);</prottype>
      </vc>
    </declare>



    <doc>
        <cmn>
Reads the directory information in the DATA SERVER.<p/>

If this function is executed while <a href="data/cnc_dtsvftpput.htm" target="_parent">cnc_dtsvftpput</a> or <a href="data/cnc_dtsvftpget.htm" target="_parent">cnc_dtsvftpget</a> is executing(until the completion status is got by <a href="data/cnc_dtsvftpstat.htm" target="_parent">cnc_dtsvftpstat</a>), EW_BUSY is returned.
        </cmn>
    </doc>



    <argument>
        <hssb>
            <vc>
                <item>
                    <name>FlibHndl</name>
                    <type>in</type>
                    <content>
                        <p>
                            Specify the library handle. See "<a href="handle.htm" target="_parent">Library handle</a>" for details.
                        </p>
                    </content>
                </item>
                <item>
                    <name>nc_file</name>
                    <type>in</type>
                    <content>
Specify the pointer to the first file name to be read.<br/>
If 'NULL'(first character is 'NULL') is specified, it is interpreted that the first file is specified.<br/>
If the specified file does not exist, it is interpreted that the next file in alphabetical order which exists in the directory is specified.<br/>
However, if the specified file is backward than the last file, it is interpreted that the last file is specified.
<p/>
                        <table>
                            <colgroup valign="top">
                            <colgroup valign="top">
                            <tr>
                                <td><![CDATA[<ex.>]]></td>
                                <td><![CDATA[It is assumed that 15 files which consists of "O0001"<-->"O0010" and "O0016"<-->"O0020" are registered in the DATA SERVER.  In this case, if settings are as follows, the information of 3 files starting from "O0016" is got.]]></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td><p class="dd">nc_file = "O0013", number = 3</p></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td>
                                    The specification of the file name of the DATA SERVER is as follows:
                                    <ul>
                                        <li>Use ASCII code.</li>
                                        <li>The last character of the file name must be 'NULL'.</li>
                                        <li>It is impossible to specify the path.</li>
                                            (The file is regarded as existing in the directory "\PROG" of the DATA SERVER in case of the DATA SERVER board(10BASE-5), or in the directory "\NCDATA" of the DATA SERVER in case of the DATA SERVER board(10BASE-T).)
                                        <li>The wild-card('*','?') cannot be used.</li>
                                        <li>Specify the MS-DOS form.</li>
                                            (file name 8 char.+'.'+extension 3 char.+'NULL', total is within 13 char.)
                                        <p class="dd"><![CDATA[<ex.>]]>      "XXXXXXXX.XXX" + NULL</p>
                                            However, the "O" number is managed as a file name now.
                                        <p class="dd"><![CDATA[<ex.>]]>      "O0001" + NULL</p>
                                    </ul>
                                </td>
                            </tr>
                            </colgroup>
                            </colgroup>
                        </table>
                    </content>
                </item>
                <item>
                    <name>number</name>
                    <type>in</type>
                    <content>
                        <p>Specify the number of directory information.</p>
                        <p class="dd"><![CDATA[effective range : 1 <= number <= 32]]></p>
                    </content>
                </item>
                <item>
                    <name>dsdir</name>
                    <type>out</type>
                    <content>
                        <p>Pointer to the ODBDSDIR structure including the directory information in the DATA SERVER.<br/>
                            The ODBDSDIR structure is as follows.</p>
<pre>
typedef struct odbdsdir {
    long    file_num ;  /* number of files in hard disk */
    long    remainder ; /* remainder capacity of hard disk */
    short   data_num ;  /* number of directory */
    struct {
        char    file_name[16] ; /* file name */
        char    comment[64] ;   /* comment */
        long    size ;          /* file size */
        char    date[16] ;      /* update date */
    } data[32] ;
} ODBDSDIR ;
</pre>

                        <dl>
                            <dt>file_num</dt>
                            <dd>Number of files registered in hard disk of the DATA SERVER</dd>
                            <br/>
                            <dt>remainder</dt>
                            <dd>The remainder capacity of hard disk of the DATA SERVER(byte)</dd>
                            <br/>
                            <dt>data_num</dt>
                            <dd>Number of directory information</dd>
                            <br/>
                            <dt>file_name</dt>
                            <dd>File name</dd>
                            <br/>
                            <dt>comment</dt>
                            <dd>
                                Comment<br/>
                                The comment just behind the file name is stored by ASCII code.  The character string is terminated by 'NULL' and 64 characters or less are stored including 'NULL'. However, LF is not included.
                            </dd>
                            <br/>
                            <dt>size</dt>
                            <dd>File size(byte)</dd>
                            <br/>
                            <dt>date</dt>
                            <dd>
                                Updated date of file<br/>
                                This is stored by the ASCII character string of following form. The character string is terminated by 'NULL'.<p/>
                                <p><img src="data/cnc_dtsvrdpgdir.gif"/></p>
                            </dd>
                            <br/>
                        </dl>
                    </content>
                </item>
            </vc>
        </hssb>
    </argument>



    <errcode>
        <item>
            <name>EW_BUSY</name>
            <content>
                Busy<br/>
                Try again because DATA SERVER is processing.<br/>
                (The unexecution of <a href="data/cnc_dtsvftpstat.htm" target="_parent">cnc_dtsvftpstat</a> is included.)
            </content>
        </item>
        <item>
            <name>EW_NUMBER</name>
            <content>
                Data number error<br/>
                The number of directory to read is wrong.
            </content>
        </item>
        <item>
            <name>EW_NOOPT</name>
            <content>
No option
<table>
<tr> <td valign="top">-</td> <td valign="top">The extended driver/library function is necessary.</td> </tr>
<tr> <td valign="top">-</td> <td valign="top">The DATA SERVER board(hardware) is necessary.</td> </tr>
</table>

</content>
        </item>

        <item>
            <name>EW_DTSRVR</name>
            <content>
                 DATA SERVER error<br/>
                 In order to get more information for this err_no return value, execute <a href="misc/cnc_getdtailerr.htm" target="_parent">cnc_getdtailerr</a> function.  The following details status will be set onto the member, err_no of ODBERR structure.
                <table class="dd">
                    <tr><td>1 <![CDATA[<-->]]>  498</td><td>:</td><td>DATA SERVER error</td></tr>
                    <tr><td>499</td><td>:</td> <td>DATA SERVER system error</td></tr>
                </table>
            </content>
        </item>
        <add></add>
    </errcode>



    <option>
        <hssb>The extended driver/library function is necessary.</hssb>
    </option>



    <parameter></parameter>



    <mode></mode>



    <support>
        <m>
            <fs0ia>X</fs0ia>
            <fs0ib>H</fs0ib>
            <fs15>H</fs15>
            <fs15i>X</fs15i>
            <fs16>H</fs16>
            <fs18>H</fs18>
            <fs21>X</fs21>
            <fs16ia>H</fs16ia>
            <fs18ia>H</fs18ia>
            <fs21ia>H</fs21ia>
            <fs16ib>H</fs16ib>
            <fs18ib>H</fs18ib>
            <fs21ib>H</fs21ib>
            <fs30i>X</fs30i>
        </m>
        <t>
            <fs0ia>X</fs0ia>
            <fs0ib>H</fs0ib>
            <fs15>H</fs15>
            <fs15i>X</fs15i>
            <fs16>H</fs16>
            <fs18>H</fs18>
            <fs21>X</fs21>
            <fs16ia>H</fs16ia>
            <fs18ia>H</fs18ia>
            <fs21ia>H</fs21ia>
            <fs16ib>H</fs16ib>
            <fs18ib>H</fs18ib>
            <fs21ib>H</fs21ib>
            <fs30i>X</fs30i>
        </t>
        <lc>
            <fs0ia>X</fs0ia>
            <fs0ib>X</fs0ib>
            <fs15>X</fs15>
            <fs15i>X</fs15i>
            <fs16>X</fs16>
            <fs18>X</fs18>
            <fs21>X</fs21>
            <fs16ia>X</fs16ia>
            <fs18ia>X</fs18ia>
            <fs21ia>X</fs21ia>
            <fs16ib>X</fs16ib>
            <fs18ib>X</fs18ib>
            <fs21ib>X</fs21ib>
            <fs30i>X</fs30i>
        </lc>
        <p>
            <fs16i>H</fs16i>
            <fs18i>H</fs18i>
        </p>
        <l>
            <fs16i>H</fs16i>
            <fs18i>X</fs18i>
        </l>
        <w>
            <fs16i>X</fs16i>
            <fs18i>X</fs18i>
        </w>
        <pw>
            <d>X</d>
            <h>X</h>
        </pw>
        <add><b></b></add>
    </support>



    <reference></reference>



  </func>
</root>
