/// <summary> /// Sets up a log file /// </summary> static public void Initialize() { start = DateTime.Now; Pathing.CreateDirectory(Dir); CheckFile(); WriteBeginning(); }
// Creates the xml writer to use, deletes if already existing private static XmlWriter getXmlWriter(string dest) { XmlWriterSettings settings = new XmlWriterSettings(); settings.Encoding = Encoding.UTF8; settings.Indent = true; if (File.Exists(dest)) { File.Delete(dest); } else if (!Directory.Exists(dest)) { Pathing.CreateDirectory(dest); } XmlWriter write = XmlWriter.Create(dest + "Songlist.xml", settings); return(write); }