Function write_file
Source pub fn write_file(path: &str, data: &[u8]) -> Result<usize, KernelError>
Expand description
Write data to a file, creating it if it doesn’t exist
§Arguments
path - The filesystem path to the file
data - The data to write
§Returns
Ok(usize) - The number of bytes written on success
Err(&'static str) - An error message on failure