Write into a file

    0

    0

    Giovanny Gongora

    Codiga's Rust Recipes

    Write a String to a file

    use std::fs;
    
    let data = "Hello from Codiga!";
    fs::write("/home/filename", data).expect("Impossible to write file");
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.