1 2 3 4 5 6 7 8 9 10 11 12 13
pub trait WriteContent { fn write_content(&self, content: &str) -> std::io::Result<()>; } /// see if file exists in the given path pub trait FileExists { fn file_exists(&self) -> bool; } /// delete a file pub trait DeleteFile { fn delete_file() -> std::io::Result<()>; }