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.Method
canExecuteMethod
private java.lang.reflect.Method
setExecutableMethod
private java.lang.reflect.Method
setReadableMethod
private java.lang.reflect.Method
setWritableMethod
-
Constructor Summary
Constructors Constructor Description Java6FileApiPermissionsStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
canExecute(java.io.File file)
ZTFilePermissions
getPermissions(java.io.File file)
GetZTFilePermissions
from file.private boolean
setExecutable(java.io.File file, boolean executable, boolean ownerOnly)
void
setPermissions(java.io.File file, ZTFilePermissions permissions)
SetZTFilePermissions
to fileprivate boolean
setReadable(java.io.File file, boolean executable, boolean ownerOnly)
private boolean
setWritable(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:ZTFilePermissionsStrategy
GetZTFilePermissions
from file.- Specified by:
getPermissions
in interfaceZTFilePermissionsStrategy
- Parameters:
file
- file to get permissions for- Returns:
- permissions or
null
if cannot retrieve permissions info by some reason.
-
setPermissions
public void setPermissions(java.io.File file, ZTFilePermissions permissions)
Description copied from interface:ZTFilePermissionsStrategy
SetZTFilePermissions
to file- Specified by:
setPermissions
in 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)
-
-