Function fsutils::create_file_bytes[][src]

pub fn create_file_bytes(path: &str, bytes_to_write: &[u8]) -> bool
Expand description

Creates a file from bytes and returns a boolean based on success or failure.

Usage:

let binary_file: &'static [u8] = b"01001000 01100101 01101100 01101100 01101111 00100001";

assert_eq!(fsutils::create_file_bytes("a_binary_file", binary_file), true);