Saturday, 1 March 2014

FreePascal programming notes #1

Missing information for TStream.CopyFrom method highlighted below.
TStream.CopyFrom
Copy data from one stream to another
DeclarationSource position: classesh.inc line 806
public function TStream.CopyFrom(Source:TStream; Count:Int64):Int64;
DescriptionCopyFrom reads Count bytes from Source and writes them to the current stream. This updates the current position in the stream. After the action is completed, the number of bytes copied is returned.
This can be used to quickly copy data from one stream to another or to copy the whole contents of the stream.
Count = 0 will set Source.position to 0 and copy the whole stream.

No comments:

Post a Comment