Java FilePermission Class
Java FilePermission class contains the permission related to a directory or file. All the permissions are related with path. The path can be of two types:
1) D:\\IO\\-: It indicates that the permission is associated with all sub directories and files recursively.
2) D:\\IO\\*: It indicates that the permission is associated with all directory and files within this directory excluding sub directories.
Java FilePermission class declaration
Let's see the declaration for Java.io.FilePermission class:
Methods of FilePermission class
Java FilePermission class methods
Java FilePermission Example
Let's see the simple example in which permission of a directory path is granted with read permission and a file of this directory is granted for write permission.
Read, Write permission is granted for the path D:\IO Package\java.txt