public static CreateDirIfNotExists ( string filePath ) : void | ||
filePath | string | |
리턴 | void |
public static void Write(string data, string fileName) { lock (logSync) { FileUtils.CreateDirIfNotExists(fileName); bool fileInUse = true; while (fileInUse) { try { using (StreamWriter log = File.AppendText(fileName)) { log.WriteLine(data); } fileInUse = false; } catch (System.IO.IOException) { fileInUse = true; } } } }
Settings() { FileUtils.CreateDirIfNotExists(DataPath); }