C# 遍历指定目录下的所有文件及文件夹

// DirectoryInfo di = new DirectoryInfo(@"D:\Test");
// FindFile(di);
static void FindFile(DirectoryInfo di)
{
  FileInfo[] fis = di.GetFiles();
  for (int i = ; i < fis.Length; i++)
  {
    Console.WriteLine("文件:" + fis[i].FullName);
  }
  DirectoryInfo[] dis = di.GetDirectories();
  for (int j = ; j < dis.Length; j++)
  {
    Console.WriteLine("目录:" + dis[j].FullName);
    FindFile(dis[j]);
  }
}
上一篇:CAS Spring Security 3 整合配置(转)


下一篇:Spring Security Oauth2 的配置