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

📄 filesystemoperator.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/src/qtopiadesktop/common/filesystemoperator.cpp:305 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>FileSystemOperator Class</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="200" align="left" valign="top"><a href="index.html"><img height="27" width="472" src="dochead.png" border="0"></a><br><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qtopia</font>   <a href="index.html">Home</a> - <a href="qtopiaclasses.html">Classes</a> - <a href="qtopiaannotated.html">Annotated</a> - <a href="qtopiafunctions.html">Functions</a> - <a href="qtindex.html">Qt Embedded</a></td><td align="right" valign="top">  <table border="0" cellpadding="0" cellspacing="0" width="137">  <tr>  <td><a href="http://www.trolltech.com/company/about/trolls.html"><img height="100" width="100" src="face.png" border="0"></a></td>  <td><img height="100" width="100" src="qtlogo.png" align="top" border="0"></td>  </tr>  </table></td></tr></table><h1 align=center>FileSystemOperator Class Reference</h1><p>The FileSystemOperator class transfers files to and from the PDAusing ftp and manages the file hierachy on the desktop and the PDA.<a href="#details">More...</a><p><tt>#include &lt;<a href="filesystemoperator-h.html">common/filesystemoperator.h</a>&gt;</tt><p><a href="filesystemoperator-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn><a href="#FileSystemOperator"><b>FileSystemOperator</b></a> ( PalmtopConnection&nbsp;*&nbsp;con )</div></li><li><div class=fn>QString <a href="#localDocsRoot"><b>localDocsRoot</b></a> () const</div></li><li><div class=fn>QString <a href="#localDocsPath"><b>localDocsPath</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;mimetype ) const</div></li><li><div class=fn>QString <a href="#remoteSettingsPath"><b>remoteSettingsPath</b></a> () const</div></li><li><div class=fn>QString <a href="#remoteDocsPath"><b>remoteDocsPath</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;mimeType ) const</div></li><li><div class=fn>QString <a href="#remoteAppPath"><b>remoteAppPath</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;app ) const</div></li><li><div class=fn>QString <a href="#remoteDocsRoot"><b>remoteDocsRoot</b></a> () const</div></li><li><div class=fn>QString <a href="#remoteAppRoot"><b>remoteAppRoot</b></a> () const</div></li><li><div class=fn>QString <a href="#remoteDocURI"><b>remoteDocURI</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;remoteFileName ) const</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#sendSetting"><b>sendSetting</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;filename )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#sendSetting-2"><b>sendSetting</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;localFile, const&nbsp;QString&nbsp;&amp;&nbsp;filename )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#retrieveSetting"><b>retrieveSetting</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;filename, uint&nbsp;size = 100, bool&nbsp;remoteChangesFile = TRUE )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#removeSetting"><b>removeSetting</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;filename )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#listSettings"><b>listSettings</b></a> ()</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#sendAppData"><b>sendAppData</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;app, const&nbsp;QString&nbsp;&amp;&nbsp;filename )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#sendAppData-2"><b>sendAppData</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;app, const&nbsp;QString&nbsp;&amp;&nbsp;localFile, const&nbsp;QString&nbsp;&amp;&nbsp;filename )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#retrieveAppData"><b>retrieveAppData</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;app, const&nbsp;QString&nbsp;&amp;&nbsp;filename, uint&nbsp;size = 100, bool&nbsp;remoteChangesFile = TRUE )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#listAppData"><b>listAppData</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;app )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#removeAppData"><b>removeAppData</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;app, const&nbsp;QString&nbsp;&amp;&nbsp;filename )</div></li><li><div class=fn>TransferReceipt * <a href="#sendDocument"><b>sendDocument</b></a> ( const&nbsp;QdDocLnk&nbsp;&amp;&nbsp;lnk, bool&nbsp;link )</div></li><li><div class=fn>QPtrList&lt;TransferReceipt&gt; <a href="#removeDocument"><b>removeDocument</b></a> ( QdDocLnk&nbsp;&amp;&nbsp;lnk )</div></li><li><div class=fn>TransferReceipt * <a href="#retrieveDocument"><b>retrieveDocument</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;docRoot, const&nbsp;QString&nbsp;&amp;&nbsp;filename, const&nbsp;QString&nbsp;&amp;&nbsp;mimeType, uint&nbsp;size = 1024, QString&nbsp;destDir = QString::null )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#listDocuments"><b>listDocuments</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;docRoot, const&nbsp;QString&nbsp;&amp;&nbsp;mime )</div></li><li><div class=fn>TransferReceipt * <a href="#removeDocument-2"><b>removeDocument</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;docsRoot, const&nbsp;QString&nbsp;&amp;&nbsp;fname, const&nbsp;QString&nbsp;&amp;&nbsp;mime )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#list"><b>list</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;path )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#sendOther"><b>sendOther</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;localFile, const&nbsp;QString&nbsp;&amp;&nbsp;remoteFile )</div></li><li><div class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a href="#retrieveOther"><b>retrieveOther</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;remoteFile, const&nbsp;QString&nbsp;&amp;&nbsp;localFile, uint&nbsp;size = 1024 )</div></li><li><div class=fn>virtual void <a href="#stop"><b>stop</b></a> ()</div></li><li><div class=fn>bool <a href="#isExecuting"><b>isExecuting</b></a> () const</div></li></ul><h2>Public Slots</h2><ul><li><div class=fn>void <a href="#setConnectionEnabled"><b>setConnectionEnabled</b></a> ( bool&nbsp;v )</div></li><li><div class=fn>void <a href="#setConnected"><b>setConnected</b></a> ()</div></li><li><div class=fn>void <a href="#setDisconnected"><b>setDisconnected</b></a> ()</div></li></ul><h2>Signals</h2><ul><li><div class=fn>void <a href="#pdaVersionReceived"><b>pdaVersionReceived</b></a> ( int&nbsp;major, int&nbsp;minor, const&nbsp;QString&nbsp;&amp;&nbsp;arch )</div></li><li><div class=fn>void <a href="#handshakeDone"><b>handshakeDone</b></a> ( bool&nbsp;locked )</div></li><li><div class=fn>void <a href="#start"><b>start</b></a> ( int&nbsp;totalNumBytes )</div></li><li><div class=fn>void <a href="#newTotalBytes"><b>newTotalBytes</b></a> ( int&nbsp;newTotal )</div></li><li><div class=fn>void <a href="#progressUpdate"><b>progressUpdate</b></a> ( int&nbsp;numBytesDone, int&nbsp;totalNumBytes, TransferReceipt&nbsp;*&nbsp;receipt )</div></li><li><div class=fn>void <a href="#progress"><b>progress</b></a> ( int&nbsp;bytesDone )</div></li><li><div class=fn>void <a href="#done"><b>done</b></a> ( int&nbsp;totalNumBytes )</div></li><li><div class=fn>void <a href="#executing"><b>executing</b></a> ( TransferReceipt&nbsp;*&nbsp;r )</div></li><li><div class=fn>void <a href="#errorExecuting"><b>errorExecuting</b></a> ( TransferReceipt&nbsp;*&nbsp;r )</div></li><li><div class=fn>void <a href="#successExecuting"><b>successExecuting</b></a> ( TransferReceipt&nbsp;*&nbsp;r )</div></li><li><div class=fn>void <a href="#pdaMessage"><b>pdaMessage</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;call, const&nbsp;QByteArray&nbsp;&amp;&nbsp;params )</div></li></ul><h2>Static Public Members</h2><ul><li><div class=fn>const QString &amp; <a href="#localCenterPath"><b>localCenterPath</b></a> ()</div></li><li><div class=fn>QString <a href="#localBackupPath"><b>localBackupPath</b></a> ()</div></li><li><div class=fn>bool <a href="#ensureLocalPath"><b>ensureLocalPath</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;localPath )</div></li><li><div class=fn>QString <a href="#stripPath"><b>stripPath</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;filePath )</div></li><li><div class=fn>QString <a href="#fileBase"><b>fileBase</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;filePath )</div></li><li><div class=fn>QString <a href="#dirPath"><b>dirPath</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;filePath )</div></li><li><div class=fn>QString <a href="#tempPath"><b>tempPath</b></a> ()</div></li><li><div class=fn>bool <a href="#copyLocalFile"><b>copyLocalFile</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;source, const&nbsp;QStringList&nbsp;&amp;&nbsp;destFilenames )</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2> <p> The FileSystemOperator class transfers files to and from the PDAusing ftp and manages the file hierachy on the desktop and the PDA.<p> <p> The FileMananger class is the main communication class to talk to theremote PDA.  The FileSystemOperator class allows for transferingsettings files, application files, and user files.<p> Settings files are probably stored in an rc file. One settings filemay be shared by many applications.  For example, there may be onesettings file that contains PDA specific information such as thelocal time zone, language, and display options.<p> To do: Docs about app files...<p> To do: Docs about user data files...<p> The FileSystemOperator class provides send, retrieve, remove and listmethods for settings, application data, and user data.  The sendmethods send data from the local computer to the remote computer(eg. from desktop to PDA). The retrieve methods retrieve a file fromthe PDA and place it in the appropriate local directory.  The removemethods removes the files on both the local and remote file systems.The list methods provide a listing on the remote file systems.<p> The FileSystemOperator class verifies the locally directory existsbefore retrieving files from the remote machine and that remotedirectories exist beforing sending files.  Since remote directorytrees may need to be created on the remote machine, there may need tobe several mkdir operations before actually copying the local file tothe remote directory.  To know when the send copy commands areactually started and to connect with the associatedQNetworkOperation, connect to the startSend signal.<p> The FileSystemOperator class uses the QUrlOperator to actuallyperform the ftp copy, remove, and file listing commands.  The callerof the class can connect to the QUrlOperator signals for feedback ofeach call.<p> The FileSystemOperator class places the files in their appropriatedirectories on both the PDA and the local side.  If the directoriesdon't exist on either side, then the directories are created.<p>See also <a href="qtopiadesktop.html">Qtopia Desktop Classes</a>.<hr><h2>Member Function Documentation</h2><h3 class=fn><a name="FileSystemOperator"></a>FileSystemOperator::FileSystemOperator ( PalmtopConnection&nbsp;*&nbsp;con )</h3>Constructs a FileSystemOperator object using PalmtopConnection <em>con</em><h3 class=fn>bool <a name="copyLocalFile"></a>FileSystemOperator::copyLocalFile ( const&nbsp;QString&nbsp;&amp;&nbsp;source, const&nbsp;QStringList&nbsp;&amp;&nbsp;destFilenames )<tt> [static]</tt></h3>Copy local file <em>source</em> to destination files <em>destFilenames</em>.<h3 class=fn>QString <a name="dirPath"></a>FileSystemOperator::dirPath ( const&nbsp;QString&nbsp;&amp;&nbsp;filePath )<tt> [static]</tt></h3>Returns the directory path of the absolute file path <em>filePath</em>.<h3 class=fn>void <a name="done"></a>FileSystemOperator::done ( int&nbsp;totalNumBytes )<tt> [signal]</tt></h3> <p> This signal is emitted when the transfer currently processed by the FileSystemOperatoris completed. <em>totalNumBytes</em> is the total number of bytes transfered.<h3 class=fn>bool <a name="ensureLocalPath"></a>FileSystemOperator::ensureLocalPath ( const&nbsp;QString&nbsp;&amp;&nbsp;localPath )<tt> [static]</tt></h3>Ensures that <em>localPath</em> exists.  If doesn't exist, tries to create it.Returns true if path exists.<h3 class=fn>void <a name="errorExecuting"></a>FileSystemOperator::errorExecuting ( <a href="transferreceipt.html">TransferReceipt</a>&nbsp;*&nbsp;r )<tt> [signal]</tt></h3> <p> This signal is emitted when an error occurred while processing a transfer operation.<em>r</em> is a pointer to the <a href="transferreceipt.html">TransferReceipt</a> associated with this transfer.<h3 class=fn>void <a name="executing"></a>FileSystemOperator::executing ( <a href="transferreceipt.html">TransferReceipt</a>&nbsp;*&nbsp;r )<tt> [signal]</tt></h3> <p> This signal is emitted when the FileSystemOperator starts to process ascheduled transfer.<em>r</em> is a pointer to the <a href="transferreceipt.html">TransferReceipt</a> associated with this transfer.<h3 class=fn>QString <a name="fileBase"></a>FileSystemOperator::fileBase ( const&nbsp;QString&nbsp;&amp;&nbsp;filePath )<tt> [static]</tt></h3>Returns the base file name (no extension) of the absolut file path <em>filePath</em>.<h3 class=fn>void <a name="handshakeDone"></a>FileSystemOperator::handshakeDone ( bool&nbsp;locked )<tt> [signal]</tt></h3> <p> This signal is emitted when the FileSystemOperator was successfull doing a handshakeoperation with the Qtopia device. <em>locked</em> is TRUE if the device is locked by another connection.<h3 class=fn>bool <a name="isExecuting"></a>FileSystemOperator::isExecuting () const</h3> <p> Returns TRUE if the FileSystemOperator is currently processing a send/retrieve or list command.<h3 class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a name="list"></a>FileSystemOperator::list ( const&nbsp;QString&nbsp;&amp;&nbsp;path )</h3> <p> Retrieve a directory listing of directory <em>path</em>.<h3 class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a name="listAppData"></a>FileSystemOperator::listAppData ( const&nbsp;QString&nbsp;&amp;&nbsp;app )</h3> <p> Retrieve a directory listing of the application <em>app</em> data directory on the Qtopia device.<h3 class=fn>QGuardedPtr&lt;TransferReceipt&gt; <a name="listDocuments"></a>FileSystemOperator::listDocuments ( const&nbsp;QString&nbsp;&amp;&nbsp;docRoot, const&nbsp;QString&nbsp;&amp;&nbsp;mime )</h3>Retrieve a directory listing of the directory holding documents of mimetype <em>mime</em> inthe document base directory <em>docRoot</em> from the Qtopia device.

⌨️ 快捷键说明

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