Crate file_editor

Source
Expand description

file-editor − clean, chain-friendly text-file editing.

use file_editor::Editor;
Editor::create("demo.txt")?                 // new file
    .append("world\n")
    .prepend("hello ")
    .insert_after("hello", " rustaceans!\n", false)
    .save()?;

See Editor for the full API.

Modules§

utils

Structs§

Editor
Handle to a UTF-8 text file kept in memory until save is called.