public class FilePermissionUtils
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static void |
addDirectoryPath(java.security.Permissions policy,
java.lang.String configurationName,
java.nio.file.Path path,
java.lang.String permissions) |
Add access to path (and all files underneath it); this also creates the directory if it does not exist.
|
static void |
addSingleFilePath(java.security.Permissions policy,
java.nio.file.Path path,
java.lang.String permissions) |
Add access to single file path
|
public static void addSingleFilePath(java.security.Permissions policy, java.nio.file.Path path, java.lang.String permissions) throws java.io.IOException
policy
- current policy to add permissions topath
- the path itselfpermissions
- set of file permissions to grant to the pathjava.io.IOException
public static void addDirectoryPath(java.security.Permissions policy, java.lang.String configurationName, java.nio.file.Path path, java.lang.String permissions) throws java.io.IOException
policy
- current policy to add permissions toconfigurationName
- the configuration name associated with the path (for error messages only)path
- the path itselfpermissions
- set of file permissions to grant to the pathjava.io.IOException