Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Schniz/fnm.rs. An experimental Rust implementation of fnm github.com/Schniz/fnm
Something went wrong. Try again.
12345678910111213141516171819202122232425use super::*;
#[derive(Debug)]pub struct WriteFile { name: &'static str, contents: &'static str,}
impl WriteFile { pub(crate) fn new(name: &'static str, contents: &'static str) -> Self { Self { name, contents } }}
impl<S: Shell> Expression<S> for WriteFile { fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { write!( writer, "echo {} > {}", S::shell_escape(self.contents), S::shell_escape(self.name) ) }}