This method of the FileIOPermission Class adds a specific file to the permission, either allowing or denying that file for the specified access types. The file is expanded to its fully qualified form using the java.io.File.getCanonicalPath method.
public void addFile(int access, String filename, boolean allowed) throws IOException;
access | An access type that is one of the following values: FileIORequest.READ, FileIORequest.WRITE, or FileIORequest.DELETE. |
filename | The name of the file to add to the permission. |
allowed | The flag that indicates whether you are allowing or denying the file for the specified access type. If the value is true, the file is allowed; otherwise, the file is denied. |
IOException if an error occurs while getting the full name of the file.