Function async_write_to_file

Source
pub async fn async_write_to_file(
    file_path: &str,
    content: &[u8],
) -> Result<(), Error>
Expand description

Writes content to a file asynchronously.

§Arguments

  • &str - The path to the file.
  • &[u8] - The content to write.

§Returns

  • Result<(), std::io::Error> - Ok if successful, Err with error details otherwise.