All pastes #52547 Raw Edit

Unnamed

public text v1 · immutable
#52547 ·published 2006-05-01 12:29 UTC
rendered paste body
function LoadFile(FilePath: String): String;
var
  Stream: TFileStream;
begin
  Stream := TFileStream.Create(FilePath, fmOpenRead);
  try
    SetLength(Result, Stream.Size);
    Stream.ReadBuffer(Result[1], Length(Result));
  finally
    FreeAndNil(Stream);
  end;
end;