开发者

how to set the folder permission programatically in c#

开发者 https://www.devze.com 2023-01-23 17:28 出处:网络
I need to set the folder permission programatically.My req开发者_运维技巧uirement iswhen i set the parent folder, all its subfolders must inherit the parent permissions.You would need to use the Syste

I need to set the folder permission programatically. My req开发者_运维技巧uirement is when i set the parent folder, all its subfolders must inherit the parent permissions.


You would need to use the System.Management and System.Security frameworks:

http://www.redmondpie.com/applying-permissions-on-any-windows-folder-using-c/

To apply the same permissions in all subdirectories, you would need to use a foreach loop to iterate over all subdirectories of the directory you wish to modify.

0

精彩评论

暂无评论...
验证码 换一张
取 消