| java.lang.Object | ||
| ↳ | java.security.Permission | |
| ↳ | java.io.FilePermission | |
A permission for accessing a file or directory. The FilePermission is made up of a pathname and a set of actions which are valid for the pathname.
The File.separatorChar must be used in all pathnames when
constructing a FilePermission. The following descriptions will assume the
char is /. A pathname that ends in /* includes all the files
and directories contained in that directory. If the pathname
ends in /-, it includes all the files and directories in that
directory recursively. The following pathnames have a special meaning:
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new FilePermission with the path and actions specified.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Indicates if this file permission is equal to another.
| |||||||||||
Returns the actions associated with this file permission.
| |||||||||||
Calculates the hash code value for this file permission.
| |||||||||||
Indicates whether the permission
p is implied by this file
permission. | |||||||||||
Returns a new PermissionCollection in which to place FilePermission
objects.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.security.Permission
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.security.Guard
| |||||||||||
Constructs a new FilePermission with the path and actions specified.
| path | the pathname of the file or directory to apply the actions to. |
|---|---|
| actions | the actions for the path. May be any combination of
"read", "write", "execute" and "delete". |
| IllegalArgumentException | if actions is null or an empty string, or if
it contains a string other than "read", "write", "execute"
and "delete". |
|---|---|
| NullPointerException | if path is null.
|
Indicates if this file permission is equal to another. The two are equal
if obj is a FilePermission, they have the same path, and they
have the same actions.
| obj | the object to check equality with. |
|---|
true if this file permission is equal to obj,
false otherwise.
Returns the actions associated with this file permission.
Calculates the hash code value for this file permission.
Indicates whether the permission p is implied by this file
permission. This is the case if p is an instance of
FilePermission, if p's actions are a subset of this
file permission's actions and if p's path is implied by this
file permission's path.
| p | the permission to check. |
|---|
true if the argument permission is implied by the
receiver, and false if it is not.
Returns a new PermissionCollection in which to place FilePermission objects.