Check out example codes for "create file rust". It will help you in understanding the concepts better.

Code Example 1

use std::fs::File;

fn main() -> std::io::Result<()> {
    let mut f = File::create("foo.txt")?;
    Ok(())
}

Learn ReactJs, React Native from akashmittal.com