use std::fs;
      
      let data = "Hello from Codiga!";
      fs::write("/home/filename", data).expect("Impossible to write file");
      

      Rust language logo
      Write into a file

      Codiga's Rust Recipes

      Write a String to a file

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.