⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classpftpclient.html

📁 pwlib开发文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PFTPClient class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center><hr><h1>PFTPClient Class Reference</h1><code>#include &lt;<a class="el" href="ftp_8h-source.html">ftp.h</a>&gt;</code><p><p>Inheritance diagram for PFTPClient:<p><center><img src="classPFTPClient.png" usemap="#PFTPClient_map" border="0" alt=""></center><map name="PFTPClient_map"><area href="classPFTP.html" alt="PFTP" shape="rect" coords="0,224,109,248"><area href="classPInternetProtocol.html" alt="PInternetProtocol" shape="rect" coords="0,168,109,192"><area href="classPIndirectChannel.html" alt="PIndirectChannel" shape="rect" coords="0,112,109,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="0,56,109,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,109,24"></map><a href="classPFTPClient-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#a0">PFTPClient</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Declare an FTP client socket.</em> <a href="#a0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#a1">~PFTPClient</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Delete and close the socket.</em> <a href="#a1"></a><em></em></font><br><br></td></tr><tr><td colspan="2"><div class="groupHeader">Overrides from class PSocket.</div></td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z479_0">Close</a> ()</td></tr><tr><td colspan="2"><div class="groupHeader">New functions for class</div></td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_0">LogIn</a> (const <a class="el" href="classPString.html">PString</a> &amp;username, const <a class="el" href="classPString.html">PString</a> &amp;password)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_1">GetSystemType</a> ()</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_2">SetType</a> (<a class="el" href="classPFTP.html#s42">RepresentationType</a> type)</td></tr><tr><td nowrap align=right valign=top>BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_3">ChangeDirectory</a> (const <a class="el" href="classPString.html">PString</a> &amp;dirPath)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_4">GetCurrentDirectory</a> ()</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPStringArray.html">PStringArray</a>&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_5">GetDirectoryNames</a> (<a class="el" href="classPFTP.html#s44">NameTypes</a> type=ShortNames, <a class="el" href="classPFTP.html#s43">DataChannelType</a> channel=Passive)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPStringArray.html">PStringArray</a>&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_6">GetDirectoryNames</a> (const <a class="el" href="classPString.html">PString</a> &amp;path, <a class="el" href="classPFTP.html#s44">NameTypes</a> type=ShortNames, <a class="el" href="classPFTP.html#s43">DataChannelType</a> channel=Passive)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a>&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_7">GetFileStatus</a> (const <a class="el" href="classPString.html">PString</a> &amp;path, <a class="el" href="classPFTP.html#s43">DataChannelType</a> channel=Passive)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPTCPSocket.html">PTCPSocket</a> *&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_8">GetFile</a> (const <a class="el" href="classPString.html">PString</a> &amp;filename, <a class="el" href="classPFTP.html#s43">DataChannelType</a> channel=NormalPort)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPTCPSocket.html">PTCPSocket</a> *&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#z481_9">PutFile</a> (const <a class="el" href="classPString.html">PString</a> &amp;filename, <a class="el" href="classPFTP.html#s43">DataChannelType</a> channel=NormalPort)</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>virtual BOOL&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#b0">OnOpen</a> ()</td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Call back to verify open succeeded in an <a class="el" href="classPInternetProtocol.html">PInternetProtocol</a> class.</em> <a href="#b0"></a><em></em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPTCPSocket.html">PTCPSocket</a> *&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#b1">NormalClientTransfer</a> (<a class="el" href="classPFTP.html#s41">Commands</a> cmd, const <a class="el" href="classPString.html">PString</a> &amp;args)</td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPTCPSocket.html">PTCPSocket</a> *&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#b2">PassiveClientTransfer</a> (<a class="el" href="classPFTP.html#s41">Commands</a> cmd, const <a class="el" href="classPString.html">PString</a> &amp;args)</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top>WORD&nbsp;</td><td valign=bottom><a class="el" href="classPFTPClient.html#n0">remotePort</a></td></tr><tr><td>&nbsp;</td><td><font size=-1><em>Port number on remote system.</em> <a href="#n0"></a><em></em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>File Transfer Protocol client channel class. <p><hr><h2>Constructor &amp; Destructor Documentation</h2><a name="a0" doxytag="PFTPClient::PFTPClient"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> PFTPClient::PFTPClient </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Declare an FTP client socket.<p>    </td>  </tr></table><a name="a1" doxytag="PFTPClient::~PFTPClient"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> PFTPClient::~PFTPClient </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Delete and close the socket.<p>    </td>  </tr></table><hr><h2>Member Function Documentation</h2><a name="z481_3" doxytag="PFTPClient::ChangeDirectory"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> BOOL PFTPClient::ChangeDirectory </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp; <em>dirPath</em>          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Change the current directory on the remote FTP host.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the log in was successfull. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>dirPath</em>&nbsp;</td><td>New directory </td></tr></table></dl>    </td>  </tr></table><a name="z479_0" doxytag="PFTPClient::Close"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> virtual BOOL PFTPClient::Close </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap><code> [virtual]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Close the socket, and if connected as a client, QUITs from server.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the channel was closed and the QUIT accepted by the server. </dl><p>Reimplemented from <a class="el" href="classPIndirectChannel.html#z157_1">PIndirectChannel</a>.    </td>  </tr></table><a name="z481_4" doxytag="PFTPClient::GetCurrentDirectory"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="classPString.html">PString</a> PFTPClient::GetCurrentDirectory </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>          <td class="md" valign="top">)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get the current working directory on the remote FTP host.<p><dl compact><dt><b>Returns: </b></dt><dd> String for the directory path, or empty string if an error occurred. </dl>    </td>  </tr></table><a name="z481_6" doxytag="PFTPClient::GetDirectoryNames"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="classPStringArray.html">PStringArray</a> PFTPClient::GetDirectoryNames </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>path</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classPFTP.html#s44">NameTypes</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>type</em> = ShortNames, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classPFTP.html#s43">DataChannelType</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>channel</em> = Passive</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get a list of files from the current working directory on the remote FTP host.<p><dl compact><dt><b>Returns: </b></dt><dd> String array for the files in the directory. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>type</em>&nbsp;</td><td>Name to get details for. </td></tr><tr><td valign=top><em>channel</em>&nbsp;</td><td>Detail level on a directory entry. Data channel type. </td></tr></table></dl>    </td>  </tr></table><a name="z481_5" doxytag="PFTPClient::GetDirectoryNames"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="classPStringArray.html">PStringArray</a> PFTPClient::GetDirectoryNames </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top"><a class="el" href="classPFTP.html#s44">NameTypes</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>type</em> = ShortNames, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classPFTP.html#s43">DataChannelType</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>channel</em> = Passive</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Get a list of files from the current working directory on the remote FTP host.<p><dl compact><dt><b>Returns: </b></dt><dd> String array for the files in the directory. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0><tr><td valign=top><em>channel</em>&nbsp;</td><td>Detail level on a directory entry. Data channel type. </td></tr></table></dl>    </td>  </tr></table><a name="z481_8" doxytag="PFTPClient::GetFile"></a><p><table width="100%" cellpadding="2" cellspacing="0" border="0">  <tr>    <td class="md">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top"> <a class="el" href="classPTCPSocket.html">PTCPSocket</a>* PFTPClient::GetFile </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> &amp;&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>filename</em>, </td>        </tr>        <tr>          <td></td>          <td></td>          <td class="md" nowrap><a class="el" href="classPFTP.html#s43">DataChannelType</a>&nbsp;</td>          <td class="mdname" nowrap>&nbsp; <em>channel</em> = NormalPort</td>        </tr>        <tr>          <td></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"></td>        </tr>      </table>    </td>  </tr></table><table cellspacing=5 cellpadding=0 border=0>  <tr>    <td>      &nbsp;    </td>    <td><p>Begin retreiving a file from the remote FTP server. The second parameter indicates that the transfer is on a normal or passive data channel. In short, a normal transfer the server connects to the client and in passive mode the client connects to the server.<p><dl compact><dt><b>Returns: </b></dt><dd> Socket to read data from, or NULL if an error occurred. </dl><dl compact><dt><b>Parameters: </b></dt><dd><table border=0 cellspacing=2 cellpadding=0>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -