positioned-io

This crate allows you to specify an offset for reads and writes, without changing the current position in a file. This is similar to pread() and pwrite() in C.

The major advantages of this type of I/O are:

Build Status Windows build status Crates.io Documentation

Example

Read the fifth 512-byte sector of a file:

```rust use std::fs::File; use positioned_io::ReadAt;

// note that file does not need to be mut let file = File::open("tests/pi.txt")?;

// read up to 512 bytes let mut buf = [0; 512]; let bytesread = file.readat(2048, &mut buf)?; ```

Documentation

https://docs.rs/positioned-io-preview

Preview release!

This is a preview release of positioned-io. Add it to your Cargo.toml like so:

toml [dependencies] positioned-io-preview = "0.3"

All examples assume you are using it as:

rust extern crate positioned_io_preview as positioned_io;

License

positioned-io is licensed under the MIT license.