Function scrawl::edit_file

source ·
pub fn edit_file<P: AsRef<Path>>(path: &P) -> Result<Reader, Box<dyn Error>>
Expand description

EditFile opens a text buffer with the content of the provided file, allowing direct editing in an editor. Returns a Readble struct on success.

Example

    /* Opens the user's editor, buffer pre-filled with custom content */
    let input = scrawl::edit_file(&"bar.rs")?;
    println!("{}", input.to_string()?);