file_offset 0.1.1

Atomically read and write files at given offsets
Documentation

file_offset provides a platform-independent way of atomically reading and writing files at specified offsets.

use file_offset::FileExt;
use std::fs::File;
use std::str;

let mut buffer = [0; 2048];
let f = File::open("src/lib.rs").unwrap();
f.read_offset(&mut buffer, 3);
print!("{}", str::from_utf8(&buffer).unwrap());