It would be nice if you can do a record level lock for read/write...
fs.flock(fd, 'sh', function(err){
fs.flockRead(bytesToRead, function(err, buffer){
//buffer should be the bytes read after an exclusive lock of that record
// offset at the current position, for the length of the bytes requested to read.
});
fs.flockWrite(buffer, function(err){})
});
It would be nice if you can do a record level lock for read/write...