October 2019
Intermediate to advanced
444 pages
10h 37m
English
Follow these quick steps to call on external programs:
use std::error::Error;use std::io::Write;use std::process::{Command, Stdio};
fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> { let mut ls_child = Command::new("ls"); if !cfg!(target_os = "windows") { ls_child.args(&["-alh"]); } println!("{}", ls_child.status()?); ls_child.current_dir("src/"); ...Read now
Unlock full access