Crates.io | cavity |
lib.rs | cavity |
version | 1.1.0 |
source | src |
created_at | 2017-11-10 02:00:49.10905 |
updated_at | 2017-11-10 21:02:31.283527 |
description | Create files padded with zeros. Alternatinve to macOS's mkfile. |
homepage | |
repository | https://github.com/Inner-Heaven/cavity |
max_upload_size | |
id | 38799 |
size | 7,543 |
Very small library to create files. It's an alternative to macOS's
mkfile(8)
that works on everything that has rust's std. Unlike mkfile
this uses configurable chunksize and has default of 512Kb.
cavity
is available on crates.io and can be included in your Cargo enabled project like this:
[dependencies]
cavity = "1.1.0"
Read the "docs".
use cavity::{fill, Bytes, WriteMode};
use std::fs::File;
let mut f = File::create("wat.test").unwrap();
fill(Bytes::MegaBytes(5), None, WriteMode::FlushEvery, &mut f).unwrap();