read_index(file, name, index, vindex, tindex, stop='\xff\xff\xff\xff\xff\xff\xff\xff', ltid='\x00\x00\x00\x00\x00\x00\x00\x00', start=4L, maxoid='\x00\x00\x00\x00\x00\x00\x00\x00', recover=0, read_only=0)
Scan the file storage and update the index.
Returns file position, max oid, and last transaction id. It also stores index information in the three dictionary arguments.
Arguments: file -- a file object (the Data.fs) name -- the name of the file (presumably file.name) index -- fsIndex, oid -> data record file offset vindex -- dictionary, oid -> data record offset for version data tindex -- dictionary, oid -> data record offset tindex is cleared before return
There are several default arguments that affect the scan or the return values. TODO: document them.
The file position returned is the position just after the last valid transaction record. The oid returned is the maximum object id in `index`, or z64 if the index is empty. The transaction id is the tid of the last transaction, or ltid if the index is empty.