public static void WriteTopicFile(string file, Topic topic)
{
if (!File.Exists(file))
{
Console.WriteLine("Writing topic file " + file);
new FileSystem().WriteToFlatFile(file, writer =>
{
writer.WriteLine("<!--Title:{0}-->".ToFormat(topic.Title));
if (topic.HasExplicitUrl())
{
writer.WriteLine("<!--Url:{0}-->".ToFormat(topic.UrlSegment));
}
writer.WriteLine("");
writer.WriteLine("TODO(WriteToText some content!)");
});
}
else
{
Console.WriteLine("Found {0} and will not overwrite", file);
}
}
}