如何检测可删除或不可删除的文件夹? [英] How to detect the folder deletable or undeletable?
问题描述
我想列出一些可删除的文件夹,但是如何检测该文件夹是可删除的还是不可删除的?
I want to to list some deletable folders, but how to detect the folder is deletable or undeletable?
推荐答案
我想列出一些可删除的文件夹文件夹,但是如何检测该文件夹是可删除还是不可删除?
I want to to list some deletable folders, but how to detect the folder is deletable or undeletable?
有关获取文件夹安全描述符的信息,请参见此处:
https://msdn.microsoft.com/en-us/library/c1f66bc2%28v = vs.110%29.aspx
See here for information about obtaining the security descriptors for a folder:
https://msdn.microsoft.com/en-us/library/c1f66bc2%28v=vs.110%29.aspx
这是您需要检查以确定当前用户权限的对象:
https://msdn.microsoft.com/en -us/library/system.security.accesscontrol.directorysecurity(v = vs.110).aspx
This is the object that you need to examine to determine the rights of the current user:
https://msdn.microsoft.com/en-us/library/system.security.accesscontrol.directorysecurity(v=vs.110).aspx
这篇关于如何检测可删除或不可删除的文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!