Top Description Fields Constructors Methods
jnr.posix.util

public Class Chmod

extends Object
Class Inheritance
Imports
java.io.File, .IOException, java.lang.reflect.InvocationTargetException, .Method

Honor semantics of chmod as best we can in pure Java. Note, this uses reflection to be more tolerant of different Java versions.

Field Summary

Modifier and TypeField and Description
private static final boolean
private static final Method
private static final Method
private static final Method

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static int
chmod(File file, String mode)

private static boolean
setPermissions(File file, char permChar, boolean userOnly)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CHMOD_API_AVAILABLEback to summary
private static final boolean CHMOD_API_AVAILABLE
setExecutableback to summary
private static final Method setExecutable
setReadableback to summary
private static final Method setReadable
setWritableback to summary
private static final Method setWritable

Constructor Detail

Chmodback to summary
public Chmod()

Method Detail

chmodback to summary
public static int chmod(File file, String mode)
setPermissionsback to summary
private static boolean setPermissions(File file, char permChar, boolean userOnly)