Reading specific parts of text file
<p>I want to read all the lines written to a text file that is constantly being updated. I have tried the following method but this has led to me reading in duplicate files.</p>

<ol>
<li>Get file size</li>
<li>Read frm zero to end of file</li>
<li>Start reading from filesize in step 1 to end of file</li>
<li>Repeat previous step</li>
</ol>

<p>The problem with this is that I duplicate files that are written to the file while I am reading it. This is because I am reading to the end of the file.</p>

<p>What I would like to do is the following</p>

<ol>
<li>Get file size</li>
<li>Read frm zero to file size from step 1</li>
<li>Get file size</li>
<li>Start reading from filesize in step 1 to file size from step 3</li>
<li>Repeat previous steps</li>
</ol>

<p>This way I will never duplicate lines read.</p>

<p>Is this possible, I think I will need to specify a start point and end point for a stream reader/file reader to read a file.</p>
