Why will this not work:

[pascal]Function IsAPack(FileNametring):Boolean;
Var Stream : TFileStream;
Signature : String[6];
Begin
Result := False; // Prove me wrong!
Stream := TFileStream.Create(FileName, fmOpenRead);
Stream.Position := Stream.Size-6;
Stream.ReadBuffer(Signature, 6);
Stream.Free;
If Signature = 'GTPACK' Then
Result := True;
End;[/pascal]