Continuously read/write to disk using random offsets and lengths .
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
benches
fuzz
src
tests
.gitignore
.travis.yml
CERTIFICATE
CHANGELOG.md
Cargo.toml
LICENSE-APACHE
LICENSE-MIT
README.md
rustfmt.toml

README.md

random-access-disk

crates.io version build status downloads docs.rs docs

Continuously read,write to disk, using random offsets and lengths. Adapted from random-access-storage/random-access-file.

Usage

extern crate tempdir;
extern crate random_access_disk;

use std::path::PathBuf;
use tempdir::TempDir;

let dir = TempDir::new("random-access-disk").unwrap();
let mut file = random_access_disk::RandomAccessDisk::new(dir.path().join("README.db"));

file.write(0, b"hello").unwrap();
file.write(5, b" world").unwrap();
let _text = file.read(0, 11).unwrap();

Installation

$ cargo add random-access-disk

License

MIT OR Apache-2.0