marking current read/write position textinputstream


I am using the following code kindly donated by Alex von Siebenthal to read from a text log file. This will grow in size throughout the day.
I know that vb uses the ‘Seek Function’ to get and mark the current read/write position. Does Xojo have a similar function.?

[code] Dim f As FolderItem

dim fiveMinutesAgo as new Date
fiveMinutesAgo.TotalSeconds = fiveMinutesAgo.TotalSeconds - 5 * 60
dim logFile as folderitem = GetFolderItem(“c:\ex130725.log”)
dim count as Integer

if logFile<> nil and logFile.Exists then
dim t as TextInputStream = TextInputStream.Open(logfile)
t.Encoding = Encodings.UTF8

While Not t.EOF
  dim line as string = t.ReadLine
  if instr(line, "BJLive/Default.aspx?") > 0 then
    dim logDate as new date
    logDate.SQLDateTime = trim(line).Left(19)
    if logDate >= fiveMinutesAgo then
      count = count + 1
    end if
  end if

end if

Label1.text = str(count)[/code]

Thanks for your help and advice.

Not that I’m aware of with a TextInputStream, but the binary stream has a .position property.

that can be used for read from that position (so you can skip bytes of data to read elsewhere in the binary file, even if the data are in fact text).

There is a positionB property on the TextInputStream which should work.

Thank you Greg for the notice.

I really have to change my glasses !
[and slow down things a bit]