StorytellerDocGen.Outline.OutlineWriter.WriteTopicFile C# (CSharp) Method

WriteTopicFile() public static method

public static WriteTopicFile ( string file, Topic topic ) : void
file string
topic StorytellerDocGen.Topics.Topic
return void
        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);
            }
        }
    }