pub struct OpenFile { /* private fields */ }Expand description
One open file handle serving positioned reads of a local plaintext file.
Opening reads no content: a local file’s current bytes are the answer to a read of it, and the one place a blob’s bytes are checked against the hash its row declares is publication, where they become canonical synced content. A read here is a read.
The handle is held for the reader’s life rather than reopened per range, and that is a property, not an optimization: a path can be replaced between two reads, a descriptor cannot, so every range comes from the one file that was opened even if it is later evicted, renamed, or replaced.
Each read positions the descriptor itself, and the mutex makes that seek and its read one operation, so concurrent readers of one handle cannot interleave into each other’s ranges.