procedure DefaultReadFile(SFTPSessionInfo: TScSFTPSessionInfo; Data: TObject; Offset: Int64; Count: cardinal; var Buffer: TBytes; var Read: cardinal; var Error: TScSFTPError); virtual;
Description
Call the DefaultReadFile method to read data of file specified by the Data object.
DefaultReadFile returns the erEof error if the end of file was reached.
Parameters:
• | SFTPSessionInfo - contains the information about the current SFTP session. |
• | Data - specifies the information about a reading file as the TScHandle object. Usually this object is previously returned by the DefaultOpenFile method. |
• | Offset - the offset in bytes relative to the beginning of the file that the read starts at. This parameter is ignored if TEXT MODE was specified during the open. |
• | Count - the maximum number of bytes to read. |
• | Buffer - the buffer to which the data will be read. |
• | Read - returns the amount of read data. |
• | Error - returns the information about an error that can arise when reading a file. The erEof error is returned if the end of file was reached. |
See also