![]() |
filechampion4j 0.9.8.3
File validation library for Java
|

Public Member Functions | |
| FileAclHelper (Path targetFilePath, String newOwnerUsername, String newPermissions) throws IllegalArgumentException | |
| String | changeFileAcl () |
Private Member Functions | |
| void | logSevere (String message) |
| void | logFine (String message) |
| UserPrincipal | getUserPrinciple (Path targetFilePath, String newOwnerUsername) |
| String | setNewOwner (UserPrincipal newOwner) |
| String | setNewPermissions (UserPrincipal newOwner) |
| String | setNewPermissionsWindows (UserPrincipal newOwner) |
| String | setNewPermissionsUnix () |
Private Attributes | |
| Path | targetFilePath |
| String | newPermissions |
| String | newOwnerUsername |
| StringBuilder | errMsg = new StringBuilder() |
Static Private Attributes | |
| static final Logger | LOGGER = Logger.getLogger(FileAclHelper.class.getName()) |
This class is used to change the owner and permissions of a file. Set Owner uses java.nio.file.Files.setOwner for cross-platform support. Set Permissions attempts to identify the Operating System, using java.nio.file.attribute.AclFileAttributeView for Windows, and java.nio.file.attribute.PosixFileAttributeView for any other.
Definition at line 19 of file FileAclHelper.java.
| dev.filechampion.filechampion4j.FileAclHelper.FileAclHelper | ( | Path | targetFilePath, |
| String | newOwnerUsername, | ||
| String | newPermissions | ||
| ) | throws IllegalArgumentException |
Class constructor
| targetFilePath | (Path) the path of the file to change |
| newOwnerUsername | (String) the new owner of the file |
| newPermissions | (String the new permissions of the file (e.g. "rwx") |
Definition at line 42 of file FileAclHelper.java.
References dev.filechampion.filechampion4j.FileAclHelper.errMsg, dev.filechampion.filechampion4j.FileAclHelper.newOwnerUsername, dev.filechampion.filechampion4j.FileAclHelper.newPermissions, and dev.filechampion.filechampion4j.FileAclHelper.targetFilePath.
| String dev.filechampion.filechampion4j.FileAclHelper.changeFileAcl | ( | ) |
changeFileAcl is the main method of this class. It attempts to change the owner and permissions of a file.
Definition at line 57 of file FileAclHelper.java.
References dev.filechampion.filechampion4j.FileAclHelper.errMsg, dev.filechampion.filechampion4j.FileAclHelper.getUserPrinciple(), dev.filechampion.filechampion4j.FileAclHelper.logFine(), dev.filechampion.filechampion4j.FileAclHelper.newOwnerUsername, dev.filechampion.filechampion4j.FileAclHelper.newPermissions, dev.filechampion.filechampion4j.FileAclHelper.setNewOwner(), dev.filechampion.filechampion4j.FileAclHelper.setNewPermissions(), and dev.filechampion.filechampion4j.FileAclHelper.targetFilePath.
Referenced by dev.filechampion.filechampion4j.FileValidator.setFileAttributes().


|
private |
Definition at line 87 of file FileAclHelper.java.
References dev.filechampion.filechampion4j.FileAclHelper.errMsg, dev.filechampion.filechampion4j.FileAclHelper.logSevere(), dev.filechampion.filechampion4j.FileAclHelper.newOwnerUsername, and dev.filechampion.filechampion4j.FileAclHelper.targetFilePath.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.changeFileAcl().


|
private |
Definition at line 30 of file FileAclHelper.java.
References dev.filechampion.filechampion4j.FileAclHelper.LOGGER.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.changeFileAcl(), dev.filechampion.filechampion4j.FileAclHelper.setNewOwner(), dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsUnix(), and dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsWindows().

|
private |
Definition at line 25 of file FileAclHelper.java.
References dev.filechampion.filechampion4j.FileAclHelper.LOGGER.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.getUserPrinciple(), dev.filechampion.filechampion4j.FileAclHelper.setNewOwner(), dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsUnix(), and dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsWindows().

|
private |
Definition at line 100 of file FileAclHelper.java.
References dev.filechampion.filechampion4j.FileAclHelper.errMsg, dev.filechampion.filechampion4j.FileAclHelper.logFine(), dev.filechampion.filechampion4j.FileAclHelper.logSevere(), dev.filechampion.filechampion4j.FileAclHelper.newOwnerUsername, and dev.filechampion.filechampion4j.FileAclHelper.targetFilePath.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.changeFileAcl().


|
private |
Definition at line 124 of file FileAclHelper.java.
References dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsUnix(), and dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsWindows().
Referenced by dev.filechampion.filechampion4j.FileAclHelper.changeFileAcl().


|
private |
Definition at line 186 of file FileAclHelper.java.
References dev.filechampion.filechampion4j.FileAclHelper.errMsg, dev.filechampion.filechampion4j.FileAclHelper.logFine(), dev.filechampion.filechampion4j.FileAclHelper.logSevere(), dev.filechampion.filechampion4j.FileAclHelper.newPermissions, and dev.filechampion.filechampion4j.FileAclHelper.targetFilePath.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.setNewPermissions().


|
private |
Definition at line 134 of file FileAclHelper.java.
References dev.filechampion.filechampion4j.FileAclHelper.errMsg, dev.filechampion.filechampion4j.FileAclHelper.logFine(), dev.filechampion.filechampion4j.FileAclHelper.logSevere(), dev.filechampion.filechampion4j.FileAclHelper.newPermissions, and dev.filechampion.filechampion4j.FileAclHelper.targetFilePath.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.setNewPermissions().


|
private |
Definition at line 23 of file FileAclHelper.java.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.FileAclHelper(), dev.filechampion.filechampion4j.FileAclHelper.changeFileAcl(), dev.filechampion.filechampion4j.FileAclHelper.getUserPrinciple(), dev.filechampion.filechampion4j.FileAclHelper.setNewOwner(), dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsUnix(), and dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsWindows().
|
staticprivate |
Definition at line 24 of file FileAclHelper.java.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.logFine(), and dev.filechampion.filechampion4j.FileAclHelper.logSevere().
|
private |
Definition at line 22 of file FileAclHelper.java.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.FileAclHelper(), dev.filechampion.filechampion4j.FileAclHelper.changeFileAcl(), dev.filechampion.filechampion4j.FileAclHelper.getUserPrinciple(), and dev.filechampion.filechampion4j.FileAclHelper.setNewOwner().
|
private |
Definition at line 21 of file FileAclHelper.java.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.FileAclHelper(), dev.filechampion.filechampion4j.FileAclHelper.changeFileAcl(), dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsUnix(), and dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsWindows().
|
private |
Definition at line 20 of file FileAclHelper.java.
Referenced by dev.filechampion.filechampion4j.FileAclHelper.FileAclHelper(), dev.filechampion.filechampion4j.FileAclHelper.changeFileAcl(), dev.filechampion.filechampion4j.FileAclHelper.getUserPrinciple(), dev.filechampion.filechampion4j.FileAclHelper.setNewOwner(), dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsUnix(), and dev.filechampion.filechampion4j.FileAclHelper.setNewPermissionsWindows().