|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.myJava.file.metadata.posix.jni.wrapper.FileAccessWrapper
public class FileAccessWrapper
This class wraps native POSIX methods for file permissions management.
Field Summary | |
---|---|
static int |
ERR_ACCESS_DENIED
|
static int |
ERR_ATTRIBUTE_NOT_FOUND
|
static int |
ERR_BUFFER_TOO_SMALL
|
static int |
ERR_DISK_QUOTA
|
static int |
ERR_FILE_NOT_FOUND
|
static int |
ERR_INTERNAL
|
static int |
ERR_INVALID_DATA
|
static int |
ERR_IO
|
static int |
ERR_LOOP
|
static int |
ERR_NAME_TOOLONG
|
static int |
ERR_NOT_A_DIRECTORY
|
static int |
ERR_NOT_ENOUGH_DISK_SPACE
|
static int |
ERR_NOT_ENOUGH_MEMORY
|
static int |
ERR_NOT_IMPLEMENTED
|
static int |
ERR_PERMISSION_DENIED
|
static int |
ERR_RO_FILESYSTEM
|
static int |
ERR_UNEXPECTED
|
static int |
ERR_UNSUPPORTED
|
static int |
MASK_PERMISSION
|
static int |
MASK_TYPE
|
static int |
TYPE_BLOCKSPECIALFILE
|
static int |
TYPE_CHARSPECFILE
|
static int |
TYPE_DIRECTORY
|
static int |
TYPE_FILE
|
static int |
TYPE_LINK
|
static int |
TYPE_PIPE
|
static int |
TYPE_SOCKET
|
Constructor Summary | |
---|---|
FileAccessWrapper()
|
Method Summary | |
---|---|
static void |
displayModeField(int bf)
Display the "mode" field's binary form |
static GetACLResult |
getACL(java.lang.String file,
boolean defaultACL)
Return the ACL of the file passed as argument. |
static GetAttributeNamesResult |
getAttributeNames(java.lang.String file,
int bufferSize,
boolean followSymLinks)
Return a list of extended attributes names bufferSize is the memory that will be allocated for the operation. |
static GetAttributeValueResult |
getAttributeValue(java.lang.String file,
java.lang.String attributeName,
long size,
boolean followSymLinks)
Return the value of the attribute |
static GetDataResult |
getData(java.lang.String file,
boolean followSymLinks)
Returns the result of the "fstat" C method. |
static int |
getGroupId(java.lang.String name)
Returns the group id matching the name provided as argument. |
static java.lang.String |
getGroupName(int id)
Returns the group name matching the id provided as argument. |
static int |
getUserId(java.lang.String name)
Returns the user id matching the name provided as argument. |
static java.lang.String |
getUserName(int id)
Returns the user name matching the id provided as argument. |
static boolean |
isA(int mode,
int tested)
Returns true if the mode has the "tested" type. |
static SetACLResult |
setACL(java.lang.String file,
ACL acl,
int size,
boolean defaultACL)
Set the acl for the file passed as argument If defaultACL == true, then only the default ACL is set If defaultACL == false, then only the access ACL is set |
static SetAttributeValueResult |
setAttributeValue(java.lang.String file,
java.lang.String attributeName,
byte[] data,
boolean followSymLinks)
Set the value of the attribute |
static SetFileModeResult |
setFileMode(java.lang.String file,
int bitField)
Sets the file's mode. |
static SetFileOwnerResult |
setFileOwner(java.lang.String file,
int owner,
int group,
boolean followSymLinks)
Sets the file's owner/group. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ERR_UNEXPECTED
public static final int ERR_NOT_ENOUGH_MEMORY
public static final int ERR_UNSUPPORTED
public static final int ERR_NAME_TOOLONG
public static final int ERR_NOT_A_DIRECTORY
public static final int ERR_FILE_NOT_FOUND
public static final int ERR_BUFFER_TOO_SMALL
public static final int ERR_ATTRIBUTE_NOT_FOUND
public static final int ERR_INVALID_DATA
public static final int ERR_NOT_ENOUGH_DISK_SPACE
public static final int ERR_PERMISSION_DENIED
public static final int ERR_RO_FILESYSTEM
public static final int ERR_DISK_QUOTA
public static final int ERR_INTERNAL
public static final int ERR_IO
public static final int ERR_NOT_IMPLEMENTED
public static final int ERR_LOOP
public static final int ERR_ACCESS_DENIED
public static final int MASK_PERMISSION
public static final int MASK_TYPE
public static final int TYPE_LINK
public static final int TYPE_SOCKET
public static final int TYPE_CHARSPECFILE
public static final int TYPE_BLOCKSPECIALFILE
public static final int TYPE_FILE
public static final int TYPE_DIRECTORY
public static final int TYPE_PIPE
Constructor Detail |
---|
public FileAccessWrapper()
Method Detail |
---|
public static GetDataResult getData(java.lang.String file, boolean followSymLinks)
public static SetFileOwnerResult setFileOwner(java.lang.String file, int owner, int group, boolean followSymLinks)
public static SetFileModeResult setFileMode(java.lang.String file, int bitField)
public static int getGroupId(java.lang.String name)
public static java.lang.String getGroupName(int id)
public static int getUserId(java.lang.String name)
public static java.lang.String getUserName(int id)
public static GetAttributeNamesResult getAttributeNames(java.lang.String file, int bufferSize, boolean followSymLinks)
public static GetAttributeValueResult getAttributeValue(java.lang.String file, java.lang.String attributeName, long size, boolean followSymLinks)
public static SetAttributeValueResult setAttributeValue(java.lang.String file, java.lang.String attributeName, byte[] data, boolean followSymLinks)
public static GetACLResult getACL(java.lang.String file, boolean defaultACL)
public static SetACLResult setACL(java.lang.String file, ACL acl, int size, boolean defaultACL)
public static boolean isA(int mode, int tested)
public static void displayModeField(int bf)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |