如何在C#4.0中枚举隐藏文件/目录
基本上我用
var directories = new DirectoryInfo(@"DirectoryName")
.EnumerateDirectories()
.Where(**What is the condition that should go here?**)
答案 0 :(得分:5)
var Directories = new DirectoryInfo(@"DirectoryName")
.EnumerateDirectories()
.Where(x => x.Attributes.HasFlag(FileAttributes.Hidden))
.Select(x => x.Name);