Do you want to:
1. Truncate the file - clear it out - make it empty - 0 bytes. ?
2. Rename the name?
3. Deleted only the information that was read from the file - but it looks like you are reading all of it so that would be the same as 1. ?
3. Deleted only the information that was read from the file - but it
looks like you are reading all of it so that would be the same as 1.
i want just read one information After that delete information
And how does the information come into the file ? Does the file get more information from somewhere else while the EA is running?
Deleting from the beginning of a file is not efficient nor easy - better option might be to keep the file open all the time - and just read the next lot of information on the next tick. - FileOpen in OnInit , FileClose in OnDeInint...
but if the file is being updated from another source at the same time look at shared files, or name pipes.
Also think about how much information is read for each tick?
If you have deleted the content, then the next tick there is nothing to read.
ydrol already asked you.....
And how does the information come into the file ?
Sorry I cant help much more without answers to earlier questions. Reading a single line and deleting every tick sounds like a bad design. Just keep the file open all the time and read the next record.
Your earlier code also looked like it was reading the entire file in one go. Change it to only read one item ?
To add comments, please log in or register