Re: rebuffering an opened file
From: lallous (lallous_at_lgwm.org)
Date: 05/31/04
- Next message: Martin Dickopp: "Re: C function overloading?"
- Previous message: Gerry Quinn: "Re: The Year 2038 Problem"
- In reply to: Fadi Komati: "rebuffering an opened file"
- Next in thread: Vijay Kumar R Zanvar: "Re: rebuffering an opened file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 31 May 2004 11:27:14 +0300
Hello Fadi,
"Fadi Komati" <fadi.komati@act.com.lb> wrote in message
news:819af1a4.0405302333.1ab3fe45@posting.google.com...
> Dear All,
> I need your help concerning the following.
> I am openeing a log file for processing (I need to look for certain
> activities)
>
> obviously i keep reading until the end of file.
>
> What i need is the following: I need to be able to reload the file in
> order to read the entries added to the end of the file. Obviouly, i
> would like the file pointer to be positioned where i stopped reading .
>
> can anyone help me with this ( a small code sample would be
> marvelous). Or if you can tell me what function call to use in order
> to reread the file and thus see the changes.
>
You can for instance use an additional file to store the last file position
(seek position) you used, and then when you want to open the log file again,
read the file position from that additional file and directly seek to that
position and continue reading.
Hope that helps,
Elias
- Next message: Martin Dickopp: "Re: C function overloading?"
- Previous message: Gerry Quinn: "Re: The Year 2038 Problem"
- In reply to: Fadi Komati: "rebuffering an opened file"
- Next in thread: Vijay Kumar R Zanvar: "Re: rebuffering an opened file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]