Function latin::file::write
[−]
[src]
pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(
path: P,
contents: C
) -> IoResult<()>
Writes content
into a file at path
.
If the file at path
does not exist, it will be created.
Otherwise, the file will be completely overwritten.
// write a string latin::file::write("./foo.txt", "contents"); // write bytes latin::file::write("./foo.txt", &[5u8, 10u8]);