public void CreateCompiled(IJournalFrontMatter journalFrontMatter, string filePath, string content) { using (var fs = _fileSystem.File.CreateText(filePath)) { fs.Write(journalFrontMatter.ToString(asFrontMatter: true)); fs.WriteLine(content); fs.Flush(); } }
public void Create(IJournalFrontMatter journalFrontMatter, string filePath, LocalDate entryDate) { using (var fs = _fileSystem.File.CreateText(filePath)) { fs.Write(journalFrontMatter.ToString(asFrontMatter: true)); fs.WriteLine($"# {entryDate.ToString()}"); fs.Flush(); } }