0

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?

1

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the input. What is your understanding of slice? Can I slice before reading? So that only a certain portion is read?
@savinger, I haven't used the File API extensively, but I'm confident that Blob.slice() is used to slice out chunks of data after the Blob has been read.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.