⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

write_file

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