[Lazarus] Lazarus forum

Marc Weustink marc at dommelstein.net
Fri Dec 19 20:21:37 CET 2008


procedure Append();
var
  sBuffer:string;
  iLength:integer;
begin

  sBuffer:='My Appended String'#13#10;
  iLength:=Length(sBuffer);

  FS:=TFileStream.Create(sFileName, fmshareDenyWrite);
  Try
    FS.Seek(0,soFromEnd);
    FS.WriteBuffer(sBuffer[1],iLength);
  Finally
    FreeAndNil(FS):
  end;
end;

On Fri, Dec 19, 2008 at 7:10 AM, Dave Coventry <dgcoventry at gmail.com> wrote:
> Can one do this?
>
> I know that you can append test to the end of Text files, but can you
> tack on data to an existing file?
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>



More information about the Lazarus mailing list