Restart a file read when the saved version changes
Read one saved snapshot from the beginning when file or manifest versions change between chunks.
A saved-file read can return several chunks. Check version and manifestVersion on each response before combining the content.
Restart from the beginning
If either version changes between responses, discard the chunks collected for that read.
Use
altifigence.workspace.files.listfor the same project and choose the current returned path.Call
altifigence.workspace.file.readfor that project and path withoffsetset to 0. Keep the same encoding for the whole read.Continue using each returned
nextOffset. Check thatversionandmanifestVersionremain unchanged from the first response, and stop whennextOffsetis null. If either version changes again, restart the read.
Use the saved snapshot
Keep the project, path and file version with your summary so you can identify the saved content used. Save an edit in Cloud before asking the client to read that edit.
Continuation offsets depend on the encoding. Use the returned nextOffset rather than calculating the next position from the displayed content.