private void DeeperDirectory(string path) { FileSystemInfo[] fsi = new DirectoryInfo(path).GetFileSystemInfos(); foreach (FileSystemInfo item in fsi) { if (item is DirectoryInfo) { //do somethings //目录 DeeperDirectory(item.FullName); } else { //文件 //do somethings } } }
时间: 2024-11-09 09:40:30