[go: up one dir, main page]

[][src]Function io_close::fs::write

pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> Result<()>

Write a slice as the entire contents of a file.

This function is identical to std::fs::write but uses Close to drop the File created from path, returning any errors encountered when doing so.