Write buffer contents to disk at a given locked offset.
Write the contents of a buffer to disk at a given offset, and explicitly
lock the region of the file whilst doing so.
- Parameters:
- obj
object Data to write to disk. Must support the buffer protocol (i.e., be
callable by memoryview()).
- fname
str Filename to write.
- offset
int Offset into the file to start writing at.
- size
int Size of the region to write to (and lock).