- java.lang.Object
-
- java.security.Permission
-
- java.security.BasicPermission
-
- java.nio.file.LinkPermission
-
- All Implemented Interfaces:
-
Serializable
,Guard
public final class LinkPermission extends BasicPermission
Permission
类链接创建操作。下表提供了许可允许的简要说明,并讨论了授予代码许可的风险。
Table shows permission target name, what the permission allows, and associated risks Permission Target Name What the Permission Allows Risks of Allowing this Permission hard Ability to add an existing file to a directory. This is sometimes known as creating a link, or hard link. Extreme care should be taken when granting this permission. It allows linking to any file or directory in the file system thus allowing the attacker access to all files. symbolic Ability to create symbolic links. Extreme care should be taken when granting this permission. It allows linking to any file or directory in the file system thus allowing the attacker to access to all files.
-
-
构造方法摘要
构造方法 Constructor 描述 LinkPermission(String name)
构造具有指定名称的LinkPermission
。LinkPermission(String name, String actions)
构造具有指定名称的LinkPermission
。
-
方法摘要
-
Methods inherited from class java.security.BasicPermission
equals, getActions, hashCode, implies, newPermissionCollection
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from class java.security.Permission
checkGuard, getName, toString
-
-
-
-
构造方法详细信息
-
LinkPermission
public LinkPermission(String name)
构造具有指定名称的LinkPermission
。- 参数
-
name
- 权限的名称。 它必须是“硬”或“象征性”的。 - 异常
-
IllegalArgumentException
- 如果名称为空或无效
-
LinkPermission
public LinkPermission(String name, String actions)
构造具有指定名称的LinkPermission
。- 参数
-
name
- 许可的名称; 必须是“硬”或“象征性”的。 -
actions
- 许可的动作; 必须是空字符串或null
- 异常
-
IllegalArgumentException
- if name is empty or invalid, or actions is a non-empty string
-
-