鸟寅

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
 private void GetAllLog(string file)
        {
            DirectoryInfo di = new DirectoryInfo(file);

            FileSystemInfo[] fsinfo = di.GetFileSystemInfos();

            foreach (FileSystemInfo fs in fsinfo)
            {
                if (fs is FileInfo)
                {
                    if (fs.Extension == ".log")
                    {
                        MainLog +="#"+fs.FullName+"\r\n\r\n"+ ReadLog(File.ReadAllText(fs.FullName));
                    }
                }
                if (fs is DirectoryInfo)
                    GetAllLog(fs.FullName);
            }
        }

  

posted on 2011-12-01 13:57  nywd  阅读(140)  评论(0编辑  收藏  举报