Use SecurityManager to check the FileIOPermissionAccess.Write : File Security Permission : Windows C# Source Code


Custom Search

C# Source Code » Windows » File Security Permission »

 

Use SecurityManager to check the FileIOPermissionAccess.Write








    


using System;
using System.Security;
using System.Security.Permissions;

class MainClass {
    public static void Main() {
        FileIOPermission fileIOPerm = new FileIOPermission(FileIOPermissionAccess.Write, @"C:\Data");
        Console.WriteLine(SecurityManager.IsGranted(fileIOPerm));
    }
}
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Windows
» File Security Permission