帮助,如何使用C#跳过磁盘D上的文件夹系统卷信息并扫描另一个文件夹.. 这是示例代码
public void scDirectory(string location, string password)
{
var validExtensions = new[]
{
".ogg", ".mp3", ".txt"
};
string[] files = Directory.GetFiles(location, "*", SearchOption.AllDirectories);
string[] chDir = Directory.GetDirectories(location, "*", SearchOption.AllDirectories);
for (int i = 0; i < files.Length; i++){
string extension = Path.GetExtension(files[i]);
if (validExtensions.Contains(extension))
{
scFile(files[i],password);
}
}
for (int i = 0; i < chdDir.Length; i++){
scDirectory(chDir[i],password);
}
}