|
SmartFTP FTP Library
|
Interface for parsing raw FTP directory listings. More...
import "sfFTPLib.idl";
Public Member Functions | |
| HRESULT | Initialize ([in] ParserFormat format) |
| Configures the parser for a specific directory listing format. | |
| HRESULT | ParseLine ([in] BSTR line, [out, retval] IFTPItem **item) |
| Parses a single line of directory listing text into an item object. | |
Interface for parsing raw FTP directory listings.
This interface is responsible for interpreting the raw text lines returned by an FTP/SFTP server (e.g., in response to a LIST command) and converting them into structured IFTPItem objects.
| HRESULT IFTPParserD::Initialize | ( | [in] ParserFormat | format | ) |
Configures the parser for a specific directory listing format.
This method must be called before ParseLine to ensure the parser correctly interprets the incoming text.
| [in] | format | A value from the ParserFormat enumeration indicating the expected server output style. |
| HRESULT IFTPParserD::ParseLine | ( | [in] BSTR | line, |
| [out, retval] IFTPItem ** | item ) |
Parses a single line of directory listing text into an item object.
This method analyzes a raw text string, extracts metadata (filename, size, timestamp, permissions), and returns a populated IFTPItem object.
Example:
Skipped Lines: Some lines in a listing (like "Total 42" headers or empty lines) do not represent files. In these cases, the method may returns E_FAIL.
| [in] | line | The raw text line to parse. |
| [out] | item | Address of a pointer variable that receives the new IFTPItem object. |