Reputation: 6714
So say there's a log file, or in my case, a binary data file. (I'm pulling data to chart real-time stripcharts.) I'd like to read it all in and do whatever, and then have my FileReader trigger again once the local file has been updated. Is this functionality supported?
Edit If I understand this correctly, then this isn't possible. Once done, the file is no longer being read. Say it ain't so! Any ways to continue reading from that point?
Upvotes: 0
Views: 186
Reputation: 4257
Section 8 of the File API spec specifies that File objects should have a lastDateModified
property. You could check this field at a regular interval and if it has changed, reread the file. As you already found in the spec, it is unfortunately not possible to continue reading from where you left off.
Upvotes: 1