Documentation/Source/eric5.Utilities.FtpUtilities.html

changeset 2047
739aa1717df5
child 2077
68a34718a0ce
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Documentation/Source/eric5.Utilities.FtpUtilities.html	Mon Sep 17 19:38:48 2012 +0200
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
+'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
+<html><head>
+<title>eric5.Utilities.FtpUtilities</title>
+<style>
+body {
+    background: #EDECE6;
+    margin: 0em 1em 10em 1em;
+    color: black;
+}
+
+h1 { color: white; background: #85774A; }
+h2 { color: white; background: #85774A; }
+h3 { color: white; background: #9D936E; }
+h4 { color: white; background: #9D936E; }
+    
+a { color: #BA6D36; }
+
+</style>
+</head>
+<body><a NAME="top" ID="top"></a>
+<h1>eric5.Utilities.FtpUtilities</h1>
+<p>
+Module implementing some FTP related utilities.
+</p>
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#FtpDirLineParser">FtpDirLineParser</a></td>
+<td>Class to parse lines returned by a FTP LIST command.</td>
+</tr><tr>
+<td><a href="#FtpDirLineParserError">FtpDirLineParserError</a></td>
+<td>Exception class raised, if a parser issue was detected.</td>
+</tr>
+</table>
+<h3>Functions</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<hr /><hr />
+<a NAME="FtpDirLineParser" ID="FtpDirLineParser"></a>
+<h2>FtpDirLineParser</h2>
+<p>
+    Class to parse lines returned by a FTP LIST command.
+</p>
+<h3>Derived from</h3>
+QObject
+<h3>Class Attributes</h3>
+<table>
+<tr><td>MacMode</td></tr><tr><td>MonthnamesNumbers</td></tr><tr><td>UnixMode</td></tr><tr><td>WindowsMode</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#FtpDirLineParser.__init__">FtpDirLineParser</a></td>
+<td>Constructor</td>
+</tr><tr>
+<td><a href="#FtpDirLineParser.__ignoreLine">__ignoreLine</a></td>
+<td>Private method to check, if the line should be ignored.</td>
+</tr><tr>
+<td><a href="#FtpDirLineParser.__parseUnixLine">__parseUnixLine</a></td>
+<td>Private method to parse a Unix style directory listing line.</td>
+</tr><tr>
+<td><a href="#FtpDirLineParser.__parseUnixMode">__parseUnixMode</a></td>
+<td>Private method to parse a Unix mode string modifying the given URL info object.</td>
+</tr><tr>
+<td><a href="#FtpDirLineParser.__parseUnixTime">__parseUnixTime</a></td>
+<td>Private method to parse a Unix date and time indication modifying the given URL info object.</td>
+</tr><tr>
+<td><a href="#FtpDirLineParser.__parseWindowsLine">__parseWindowsLine</a></td>
+<td>Private method to parse a Windows style directory listing line.</td>
+</tr><tr>
+<td><a href="#FtpDirLineParser.__parseWindowsTime">__parseWindowsTime</a></td>
+<td>Private method to parse a Windows date and time indication modifying the given URL info object.</td>
+</tr><tr>
+<td><a href="#FtpDirLineParser.__splitUnixLine">__splitUnixLine</a></td>
+<td>Split a line of a Unix like directory listing into meta data, number of links, user, group, size, month, day, year or time and name.</td>
+</tr><tr>
+<td><a href="#FtpDirLineParser.parseLine">parseLine</a></td>
+<td>Private method to parse a directory listing line.</td>
+</tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<a NAME="FtpDirLineParser.__init__" ID="FtpDirLineParser.__init__"></a>
+<h4>FtpDirLineParser (Constructor)</h4>
+<b>FtpDirLineParser</b>(<i>parent=None</i>)
+<p>
+        Constructor
+</p><dl>
+<dt><i>parent</i></dt>
+<dd>
+reference to the parent object (QObject)
+</dd>
+</dl><a NAME="FtpDirLineParser.__ignoreLine" ID="FtpDirLineParser.__ignoreLine"></a>
+<h4>FtpDirLineParser.__ignoreLine</h4>
+<b>__ignoreLine</b>(<i>line</i>)
+<p>
+        Private method to check, if the line should be ignored.
+</p><dl>
+<dt><i>line</i></dt>
+<dd>
+to check (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+flag indicating to ignore the line (boolean)
+</dd>
+</dl><a NAME="FtpDirLineParser.__parseUnixLine" ID="FtpDirLineParser.__parseUnixLine"></a>
+<h4>FtpDirLineParser.__parseUnixLine</h4>
+<b>__parseUnixLine</b>(<i>line</i>)
+<p>
+        Private method to parse a Unix style directory listing line.
+</p><dl>
+<dt><i>line</i></dt>
+<dd>
+directory line to be parsed (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+URL info object containing the valid data (QUrlInfo)
+</dd>
+</dl><dl>
+<dt>Raises <b>FtpDirLineParserError</b>:</dt>
+<dd>
+Raised if the line is not of a
+            recognized Unix format.
+</dd>
+</dl><a NAME="FtpDirLineParser.__parseUnixMode" ID="FtpDirLineParser.__parseUnixMode"></a>
+<h4>FtpDirLineParser.__parseUnixMode</h4>
+<b>__parseUnixMode</b>(<i>modeString, urlInfo</i>)
+<p>
+        Private method to parse a Unix mode string modifying the
+        given URL info object.
+</p><dl>
+<dt><i>modeString</i></dt>
+<dd>
+mode string to be parsed (string)
+</dd><dt><i>urlInfo</i></dt>
+<dd>
+reference to the URL info object (QUrlInfo)
+</dd>
+</dl><dl>
+<dt>Raises <b>FtpDirLineParserError</b>:</dt>
+<dd>
+Raised if the mode cannot be parsed.
+</dd>
+</dl><a NAME="FtpDirLineParser.__parseUnixTime" ID="FtpDirLineParser.__parseUnixTime"></a>
+<h4>FtpDirLineParser.__parseUnixTime</h4>
+<b>__parseUnixTime</b>(<i>monthAbbreviation, day, yearOrTime, urlInfo</i>)
+<p>
+        Private method to parse a Unix date and time indication modifying
+        the given URL info object.
+</p><p>
+
+</p><p>
+        Date time strings in Unix-style directory listings typically
+        have one of these formats:
+        <ul>
+          <li>"Nov 23 02:33" (month name, day of month, time)</li>
+          <li>"May 26  2005" (month name, day of month, year)</li>
+        </ul>
+</p><dl>
+<dt><i>monthAbbreviation</i></dt>
+<dd>
+abbreviation of the month name (string)
+</dd><dt><i>day</i></dt>
+<dd>
+day of the month (string)
+</dd><dt><i>yearOrTime</i></dt>
+<dd>
+string giving the year or a time (string)
+</dd><dt><i>urlInfo</i></dt>
+<dd>
+reference to the URL info object (QUrlInfo)
+</dd>
+</dl><dl>
+<dt>Raises <b>FtpDirLineParserError</b>:</dt>
+<dd>
+Raised if the month abbreviation is
+            not recognized.
+</dd>
+</dl><a NAME="FtpDirLineParser.__parseWindowsLine" ID="FtpDirLineParser.__parseWindowsLine"></a>
+<h4>FtpDirLineParser.__parseWindowsLine</h4>
+<b>__parseWindowsLine</b>(<i>line</i>)
+<p>
+        Private method to parse a Windows style directory listing line.
+</p><dl>
+<dt><i>line</i></dt>
+<dd>
+directory line to be parsed (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+URL info object containing the valid data (QUrlInfo)
+</dd>
+</dl><dl>
+<dt>Raises <b>FtpDirLineParserError</b>:</dt>
+<dd>
+Raised if the line is not of a
+            recognized Windows format.
+</dd>
+</dl><a NAME="FtpDirLineParser.__parseWindowsTime" ID="FtpDirLineParser.__parseWindowsTime"></a>
+<h4>FtpDirLineParser.__parseWindowsTime</h4>
+<b>__parseWindowsTime</b>(<i>date, time, urlInfo</i>)
+<p>
+        Private method to parse a Windows date and time indication modifying
+        the given URL info object.
+</p><p>
+        Date time strings in Windows-style directory listings typically
+        have the format "10-23-12 03:25PM" (month-day_of_month-two_digit_year,
+        hour:minute, am/pm).
+</p><dl>
+<dt><i>date</i></dt>
+<dd>
+date string (string)
+</dd><dt><i>time</i></dt>
+<dd>
+time string (string)
+</dd><dt><i>urlInfo</i></dt>
+<dd>
+reference to the URL info object (QUrlInfo)
+</dd>
+</dl><dl>
+<dt>Raises <b>FtpDirLineParserError</b>:</dt>
+<dd>
+Raised if either of the strings is not
+            recognized.
+</dd>
+</dl><a NAME="FtpDirLineParser.__splitUnixLine" ID="FtpDirLineParser.__splitUnixLine"></a>
+<h4>FtpDirLineParser.__splitUnixLine</h4>
+<b>__splitUnixLine</b>(<i>line</i>)
+<p>
+        Split a line of a Unix like directory listing into meta data,
+        number of links, user, group, size, month, day, year or time
+        and name.
+</p><dl>
+<dt>Returns:</dt>
+<dd>
+tuple of nine strings giving the meta data,
+            number of links, user, group, size, month, day, year or time
+            and name
+</dd>
+</dl><dl>
+<dt>Raises <b>FtpDirLineParserError</b>:</dt>
+<dd>
+Raised if the line is not of a
+            recognized Unix format.
+</dd>
+</dl><a NAME="FtpDirLineParser.parseLine" ID="FtpDirLineParser.parseLine"></a>
+<h4>FtpDirLineParser.parseLine</h4>
+<b>parseLine</b>(<i>line</i>)
+<p>
+        Private method to parse a directory listing line.
+</p><p>
+        This implementation support Unix and Windows style directory
+        listings. It tries Unix style first and if that fails switches
+        to Windows style. If that fails as well, an exception is raised.
+</p><dl>
+<dt><i>line</i></dt>
+<dd>
+directory line to be parsed (string)
+</dd>
+</dl><dl>
+<dt>Returns:</dt>
+<dd>
+URL info object containing the valid data (QUrlInfo)
+</dd>
+</dl><dl>
+<dt>Raises <b>FtpDirLineParserError</b>:</dt>
+<dd>
+Raised if the line is not of a
+            recognized format.
+</dd>
+</dl>
+<div align="right"><a href="#top">Up</a></div>
+<hr /><hr />
+<a NAME="FtpDirLineParserError" ID="FtpDirLineParserError"></a>
+<h2>FtpDirLineParserError</h2>
+<p>
+    Exception class raised, if a parser issue was detected.
+</p>
+<h3>Derived from</h3>
+Exception
+<h3>Class Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>
\ No newline at end of file

eric ide

mercurial