Package org.zeroturnaround.zip
Class Java6FileApiPermissionsStrategy
- java.lang.Object
-
- org.zeroturnaround.zip.Java6FileApiPermissionsStrategy
-
- All Implemented Interfaces:
ZTFilePermissionsStrategy
class Java6FileApiPermissionsStrategy extends java.lang.Object implements ZTFilePermissionsStrategy
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.MethodcanExecuteMethodprivate java.lang.reflect.MethodsetExecutableMethodprivate java.lang.reflect.MethodsetReadableMethodprivate java.lang.reflect.MethodsetWritableMethod
-
Constructor Summary
Constructors Constructor Description Java6FileApiPermissionsStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancanExecute(java.io.File file)ZTFilePermissionsgetPermissions(java.io.File file)GetZTFilePermissionsfrom file.private booleansetExecutable(java.io.File file, boolean executable, boolean ownerOnly)voidsetPermissions(java.io.File file, ZTFilePermissions permissions)SetZTFilePermissionsto fileprivate booleansetReadable(java.io.File file, boolean executable, boolean ownerOnly)private booleansetWritable(java.io.File file, boolean executable, boolean ownerOnly)
-
-
-
Field Detail
-
canExecuteMethod
private final java.lang.reflect.Method canExecuteMethod
-
setExecutableMethod
private final java.lang.reflect.Method setExecutableMethod
-
setWritableMethod
private final java.lang.reflect.Method setWritableMethod
-
setReadableMethod
private final java.lang.reflect.Method setReadableMethod
-
-
Constructor Detail
-
Java6FileApiPermissionsStrategy
public Java6FileApiPermissionsStrategy() throws ZipException- Throws:
ZipException
-
-
Method Detail
-
getPermissions
public ZTFilePermissions getPermissions(java.io.File file)
Description copied from interface:ZTFilePermissionsStrategyGetZTFilePermissionsfrom file.- Specified by:
getPermissionsin interfaceZTFilePermissionsStrategy- Parameters:
file- file to get permissions for- Returns:
- permissions or
nullif cannot retrieve permissions info by some reason.
-
setPermissions
public void setPermissions(java.io.File file, ZTFilePermissions permissions)Description copied from interface:ZTFilePermissionsStrategySetZTFilePermissionsto file- Specified by:
setPermissionsin interfaceZTFilePermissionsStrategy- Parameters:
file- file to get permissions forpermissions- permission
-
setExecutable
private boolean setExecutable(java.io.File file, boolean executable, boolean ownerOnly)
-
setWritable
private boolean setWritable(java.io.File file, boolean executable, boolean ownerOnly)
-
setReadable
private boolean setReadable(java.io.File file, boolean executable, boolean ownerOnly)
-
canExecute
private boolean canExecute(java.io.File file)
-
-