Reading Last Bytes.

BlitzMax Forums/BlitzMax Beginners Area/Reading Last Bytes.

First use FileSize() to find the size of the file if it's not already known. Then subtract 127 from that to find the offset you need to seek to. Then after opening the file, use SeekStream() to position the file pointer.
Strict
Local Size:int = FileSize("MyFile.dat")
If Size >= 128
    Local Input:TStream = ReadStream("MyFile.dat")
    SeekStream(Input,Size-127)
    ReadTheInfoFromFile()
    CloseStream Input
End If