Module implementing some FTP related utilities.
None |
FtpDirLineParser | Class to parse lines returned by a FTP LIST command. |
FtpDirLineParserError | Exception class raised, if a parser issue was detected. |
None |
Class to parse lines returned by a FTP LIST command.
MonthnamesNumbers |
None |
FtpDirLineParser | Constructor |
__ignoreLine | Private method to check, if the line should be ignored. |
__parseUnixLine | Private method to parse a Unix style directory listing line. |
__parseUnixMode | Private method to parse a Unix mode string modifying the given URL info object. |
__parseUnixTime | Private method to parse a Unix date and time indication modifying the given URL info object. |
__parseWindowsLine | Private method to parse a Windows style directory listing line. |
__parseWindowsTime | Private method to parse a Windows date and time indication modifying the given URL info object. |
__splitUnixLine | Private method to split a line of a Unix like directory listing. |
parseLine | Public method to parse a directory listing line. |
None |
Constructor
Private method to check, if the line should be ignored.
Private method to parse a Unix style directory listing line.
Private method to parse a Unix mode string modifying the given URL info object.
Private method to parse a Unix date and time indication modifying the given URL info object.
Date time strings in Unix-style directory listings typically have one of these formats:
Private method to parse a Windows style directory listing line.
Private method to parse a Windows date and time indication modifying the given URL info object.
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).
Private method to split a line of a Unix like directory listing.
It splits the line into meta data, number of links, user, group, size, month, day, year or time and name.
Public method to parse a directory listing line.
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.
Exception class raised, if a parser issue was detected.
None |
None |
None |
None |