pub fn buffer_write_file(path: &Path, vec: &[u8]) -> bool
Expand description

Writes a buffer to a file. Will create a new file if none exists or overwrite otherwise.

Example

use bin_buffer::*;
let buf = vec![0,1,2];
let path = std::path::Path::new("./buffer0.ntbr");
buffer_write_file(&path, &buf);
let res = buffer_read_file(&path);
assert_eq!(res, Option::Some(buf));