pub fn ensure_diary_file(
full_diary_path: &Path,
commit_saver_struct: &mut CommitSaver,
) -> Result<bool, Box<dyn Error>>Expand description
Makes sure the day note exists, creating it from the template if it does not.
Reports whether it had to create the file. Both writers need this step and both need it to be a no-op on an existing note: the hook must not overwrite a note it already wrote to today, and the reconciler must not overwrite one holding a month of rows.
ยงErrors
Returns an error if the path is not valid UTF-8, if the parent directories cannot be created, or if the template cannot be written.