Ejemplo n.º 1
0
        private static void DeleteLogAndChilds(string dirPath)
        {
            string logFilePath = GetLogFilePath(dirPath);

            if (File.Exists(logFilePath) == false)
            {
                return;
            }

            List <string> list = ReadLogFile(logFilePath);

            foreach (string s in list)
            {
                if (GetFileType(s) == FileType.Directory)
                {
                    DeleteLogAndChilds(dirPath + separator + GetFileName(s));
                }
            }

            File.Delete(logFilePath);
            DigdaSysLog.RemoveLogContent(DigdaSysLog.DigChangeLogPath, Path.GetFileName(logFilePath));
        }