Permission to delete from a directory

2019-08-20 01:50发布

问题:

I am writing code that checks for the permission to write to and delete from certain directories. The first is fairly easy. To whit:

FileIOPermission writePermit = new FileIOPermission(FileIOPermissionAccess.Write, _ArchiveHome);
writePermit.Demand();

But, how do I do the same for permission to delete from a given directory?

回答1:

The Write property mutually means you can delete msdn link



回答2:

The write permit allows you to modify files as in, deleting, modifying, creating, adding.



标签: c# .net security