function loadStringFromFile (const filename : string) : string;
var
  f : TFileStream;
begin
  f := nil;
  try
    f := TFileStream.create (filename, fmOpenRead);
    setLength (result, f.size);
    f.read (PChar (result)^, f.size);
  finally
    f.free;
  end;
end;


:-)


-----Original Message-----
From: Matthew Comb [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 20 June 2000 16:46
To: Multiple recipients of list delphi
Subject: [DUG]: quickie?


Chocolate fish to the first person who can tell me the correct way to get
data from a filestream to a string ??

Cheers,

Matt.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to