
(*
 Delphi Object and Component Reference
#{bmc bm18.BMP} {bmc bm10.BMP} SetTextBuf example
uses Dialogs;
var
  F, FTwo: System.TextFile;
  Ch: Char;
  Buf: array[1..4096] of Char;  { 4K buffer }
begin
  if OpenDialog1.Execute then begin
    AssignFile(F, OpenDialog1.FileName);
    { Larger buffer for faster reads }
    System.SetTextBuf(F, Buf);
    Reset(F);
    { Dump text file into another file }
    AssignFile(FTwo, 'WOOF.DOG'); 
    Rewrite(FTwo);
    while not Eof(f) do
    begin
      Read(F, Ch);
      Write(FTwo, Ch);
    end;
    System.CloseFile(F);
    System.CloseFile(FTwo);
  end;
end; 
