Microsoft SDK for Java

addFile

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.

Syntax

public void addFile(int access, String filename, boolean allowed) throws IOException;

Parameters

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.

Exceptions

IOException if an error occurs while getting the full name of the file.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.