|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.file.GroupedPermissionBits
com.mucommander.file.SimpleFilePermissions
public class SimpleFilePermissions
SimpleFilePermissions is a FilePermissions implementation that takes int values for the permission values and mask.
Additionally, this class defines padPermission static methods that allows to pad unsupported permission
bits with default values.
| Field Summary | |
|---|---|
protected PermissionBits |
mask
The permissions mask |
| Fields inherited from class com.mucommander.file.GroupedPermissionBits |
|---|
permissions |
| Fields inherited from interface com.mucommander.file.FilePermissions |
|---|
DEFAULT_DIRECTORY_PERMISSIONS, DEFAULT_FILE_PERMISSIONS, EMPTY_FILE_PERMISSIONS |
| Fields inherited from interface com.mucommander.file.PermissionBits |
|---|
EMPTY_PERMISSION_BITS, EMPTY_PERMISSION_INT, FULL_PERMISSION_BITS, FULL_PERMISSION_INT |
| Constructor Summary | |
|---|---|
SimpleFilePermissions(int permissions)
Creates a new SimpleFilePermissions using the specified UNIX-style permission int for permission values and full permissions mask. |
|
SimpleFilePermissions(int permissions,
int mask)
Creates a new SimpleFilePermissions using the specified UNIX-style permission int values for permission values and mask. |
|
SimpleFilePermissions(int permissions,
PermissionBits mask)
Creates a new SimpleFilePermissions using the specified UNIX-style permission int and permission mask. |
|
| Method Summary | |
|---|---|
PermissionBits |
getMask()
Returns the mask that indicates which permission bits are significant and should be taken into account. |
static FilePermissions |
padPermissions(FilePermissions permissions,
FilePermissions defaultPermissions)
Pads the given permissions with the specified ones: the permission bits that are not supported (as reported by the supplied permissions mask} are replaced by those of the default permissions. |
static int |
padPermissions(int permissions,
int supportedPermissionsMask,
int defaultPermissions)
Pads the given permissions with the specified ones: the permission bits that are not supported (as reported by the supplied permissions mask} are replaced by those of the default permissions. |
| Methods inherited from class com.mucommander.file.GroupedPermissionBits |
|---|
getBitValue, getIntValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.mucommander.file.PermissionBits |
|---|
getBitValue, getIntValue |
| Field Detail |
|---|
protected PermissionBits mask
| Constructor Detail |
|---|
public SimpleFilePermissions(int permissions)
full permissions mask.
permissions - a UNIX-style permission int that holds permission values.
public SimpleFilePermissions(int permissions,
int mask)
permissions - a UNIX-style permission int that holds permission values.mask - a UNIX-style permission int which defines which permission bits are supported.
public SimpleFilePermissions(int permissions,
PermissionBits mask)
permissions - a UNIX-style permission int that holds permission values.mask - a permission mask which defines which permission bits are supported.| Method Detail |
|---|
public static FilePermissions padPermissions(FilePermissions permissions,
FilePermissions defaultPermissions)
permissions - the permissions to pad with default permissions for the bits that are not supporteddefaultPermissions - permissions to use for the bits that are not supported
public static int padPermissions(int permissions,
int supportedPermissionsMask,
int defaultPermissions)
permissions - the permissions to pad with default permissions for the bits that are not supportedsupportedPermissionsMask - the bit mask that indicates which bits of the given permissions are supporteddefaultPermissions - permissions to use for the bits that are not supported
public PermissionBits getMask()
FilePermissions
getMask in interface FilePermissions
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard