System.CopyStream(OutStream, InStream [, Integer]) Method
Version: Available or changed with runtime version 1.0.
Copies the information that is contained in an InStream to an OutStream.
[Ok := ] System.CopyStream(OutStream: OutStream, InStream: InStream [, BytesToRead: Integer])
This method can be invoked without specifying the data type name.
The OutStream object to which you will copy the information; the destination stream.
The InStream object from which you want to copy; the source stream.
true if the operation was successful; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.
var F1: File; F2: File; InS: InStream; OutS: OutStream; begin F1.Open('c:\Test.txt'); F1.CreateInStream(InS); F2.Create('c:\CopyTest.txt'); F2.CreateOutStream(OutS); CopyStream(OutS,InS); F1.Close(); F2.Close(); end;