//! # Iris //! A locking plugin manager for vim mod model; pub use model::{config::Config, plugin::Plugin, repo::Repository}; mod parse; mod error; pub use error::{Error, Result}; pub mod path; use std::{ fs::File, io::{BufWriter, Write}, path::Path, }; /// Iris copyright header prepended to all generated files const COPYRIGHT_HEADER: &str = "\ IRIS - A locking plugin manager for vim Copyright © 2025 Freya Murphy This file is part of IRIS IRIS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. IRIS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with IRIS. If not, see ."; /// Opens file writer at `path` with copyright header already written pub(crate) fn get_writer

(path: P, c: char) -> Result> where P: AsRef, { let file = File::create(path)?; let mut w = BufWriter::new(file); for line in COPYRIGHT_HEADER.lines() { writeln!(w, "{c}{c}{c} {line}")?; } writeln!(w)?; Ok(w) }