Package org.elasticsearch.bootstrap
Class FilePermissionUtils
- java.lang.Object
-
- org.elasticsearch.bootstrap.FilePermissionUtils
-
public class FilePermissionUtils extends java.lang.Object
-
-
Method Summary
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
-
-
-
Method Detail
-
addSingleFilePath
public static void addSingleFilePath(java.security.Permissions policy, java.nio.file.Path path, java.lang.String permissions) throws java.io.IOException
Add access to single file path- Parameters:
policy
- current policy to add permissions topath
- the path itselfpermissions
- set of file permissions to grant to the path- Throws:
java.io.IOException
-
addDirectoryPath
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
Add access to path (and all files underneath it); this also creates the directory if it does not exist.- Parameters:
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 path- Throws:
java.io.IOException
-
-