Function file::put [] [src]

pub fn put<P: AsRef<Path>, Bytes: AsRef<[u8]>>(path: P,
                                               data: Bytes)
                                               -> Result<()>

Creates a file at the given path with contents of Vec<u8> or &[u8], etc. Overwrites, non-atomically, if the file exists. The path can be a string or a Path.