.net - C# - Retrieve list of all ReadOnly files under a directory in Windows -
i need list of readonly files under directory including files under sub-folders. there in .net framework make easier looping through files?
var path = @"c:\";//some path var readonlyfiles = new directoryinfo(path) .enumeratefiles("*", searchoption.alldirectories) .where(file => file.attributes.hasflag(fileattributes.readonly));
Comments
Post a Comment