Tuesday, 3 September 2013

Get folder's permissions (short version)

Get folder's permissions (short version)

I'm using the following code to return detailed folder permissions
return (from permissionName in Enum.GetNames(typeof(FileSystemRights))
let val =
Convert.ToInt32(
Enum.Parse(typeof(FileSystemRights),
permissionName), CultureInfo.InvariantCulture)
where
(val != 0x1f01ff) && (val != 0x301bf) && (val !=
0x20089) && (val != 0x200a9) && (val != 0x116)
where ((int)this.FileSystemRule.FileSystemRights & val) > 0
select permissionName).ToList();
How can i get the short version which is:

No comments:

Post a Comment