Checking Read/Write Permission for a Directory : Permission « Security « Java

Checking Read/Write Permission for a Directory



public class Main {
  public static void main(String[] argv) throws Exception {
    AccessController.checkPermission(new FilePermission("/tmp/*", "read,write"));



Related examples in the same category

1.Determining If One Permission Implies Another
2.Creating a Custom Permission
3.extends BasicPermission
4.boolean Permission.implies(Permission permission)
5.Controlling Access to an Object using a permission
6.Guard guard = new PropertyPermission("java.home", "read");
7.Listing All Permissions Granted to a Loaded Class GuardedObject(Object obj, Guard)
9.Object GuardedObject.getObject()
10.Execution of reflection