Skip to main content

atomically_remove_matching_lines_from_file

Function atomically_remove_matching_lines_from_file 

Source
pub fn atomically_remove_matching_lines_from_file(
    input_filepath: &Path,
    contraband_items: &[&str],
) -> Result<()>
Expand description

Rewrite a file removing lines that exactly match any of the contraband items. Unlike atomically_remove_lines_from_file, this matches complete lines (after trimming).