file_offset 0.1.1

Atomically read and write files at given offsets
Documentation
  • Coverage
  • 100%
    4 out of 4 items documented1 out of 4 items with examples
  • Size
  • Source code size: 16.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 204.54 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • tbu-/file_offset
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • tbu-

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());