Function scrawl::from_file

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

FromFile opens a text buffer with the content of the provided file in an editor. Returns a Readble struct on success.

Example

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