TStream.CopyFrom function
Copy data from one stream to another.
Declaration
function CopyFrom(Source: TStream; Count: Int64): Int64Description
CopyFrom 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. If
Count is zero, then the whole contents of the
Source stream is copied. It is positioned on the first byte of
data, and
Size bytes are copied. Note that this cannot be used
with streams that do not allow seeking or do not allow determining the size
of the stream.
This can be used to quickly copy data from one stream to another or to copy the whole contents of the stream.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
