CreateDirIfNotExists() 공개 정적인 메소드

public static CreateDirIfNotExists ( string filePath ) : void
filePath string
리턴 void
예제 #1
0
        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;
                    }
                }
            }
        }
예제 #2
0
 Settings()
 {
     FileUtils.CreateDirIfNotExists(DataPath);
 }