public class FileAttributes extends java.lang.Object implements PlexusIoResourceAttributes
| Modifier and Type | Field and Description |
|---|---|
private java.lang.Integer |
groupId |
private java.lang.String |
groupName |
protected static int |
INDEX_GROUP_EXECUTE |
protected static int |
INDEX_GROUP_READ |
protected static int |
INDEX_GROUP_WRITE |
protected static int |
INDEX_OWNER_EXECUTE |
protected static int |
INDEX_OWNER_READ |
protected static int |
INDEX_OWNER_WRITE |
protected static int |
INDEX_WORLD_EXECUTE |
protected static int |
INDEX_WORLD_READ |
protected static int |
INDEX_WORLD_WRITE |
private char[] |
mode |
private java.lang.Integer |
userId |
private java.lang.String |
userName |
protected static char |
VALUE_DISABLED_MODE |
protected static char |
VALUE_EXECUTABLE_MODE |
protected static char |
VALUE_READABLE_MODE |
protected static char |
VALUE_WRITABLE_MODE |
UNKNOWN_OCTAL_MODE| Constructor and Description |
|---|
FileAttributes(int mode) |
FileAttributes(java.lang.String lsMOdeLine) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
checkFlag(char disabledValue,
int idx) |
java.lang.Integer |
getGroupId()
Gets the unix group id.
|
java.lang.String |
getGroupName()
The group name.
|
protected char[] |
getLsModeParts() |
int |
getOctalMode()
Octal mode attributes.
|
java.lang.String |
getOctalModeString() |
java.lang.Integer |
getUserId()
Gets the unix user id.
|
java.lang.String |
getUserName()
Returns the user name of the user owning the file.
|
boolean |
isGroupExecutable() |
boolean |
isGroupReadable() |
boolean |
isGroupWritable() |
boolean |
isOwnerExecutable() |
boolean |
isOwnerReadable() |
boolean |
isOwnerWritable() |
boolean |
isSymbolicLink() |
boolean |
isWorldExecutable() |
boolean |
isWorldReadable() |
boolean |
isWorldWritable() |
private void |
setExecutable(int index,
boolean executable) |
PlexusIoResourceAttributes |
setGroupId(java.lang.Integer gid) |
PlexusIoResourceAttributes |
setGroupName(java.lang.String name) |
PlexusIoResourceAttributes |
setLsModeline(java.lang.String modeLine) |
private void |
setLsModeParts(char[] mode) |
private void |
setMode(char value,
int modeIdx) |
private void |
setOctalMode(int mode) |
private void |
setReadable(int index,
boolean readable) |
PlexusIoResourceAttributes |
setUserId(java.lang.Integer uid) |
PlexusIoResourceAttributes |
setUserName(java.lang.String name) |
private void |
setWriteable(int index,
boolean writable) |
java.lang.String |
toString() |
protected static final char VALUE_DISABLED_MODE
protected static final char VALUE_WRITABLE_MODE
protected static final char VALUE_READABLE_MODE
protected static final char VALUE_EXECUTABLE_MODE
protected static final int INDEX_WORLD_EXECUTE
protected static final int INDEX_WORLD_WRITE
protected static final int INDEX_WORLD_READ
protected static final int INDEX_GROUP_EXECUTE
protected static final int INDEX_GROUP_WRITE
protected static final int INDEX_GROUP_READ
protected static final int INDEX_OWNER_EXECUTE
protected static final int INDEX_OWNER_WRITE
protected static final int INDEX_OWNER_READ
private java.lang.Integer groupId
private java.lang.String groupName
private java.lang.Integer userId
private java.lang.String userName
private char[] mode
public FileAttributes(int mode)
public FileAttributes(@Nonnull
java.lang.String lsMOdeLine)
protected char[] getLsModeParts()
private void setLsModeParts(@Nonnull
char[] mode)
@Nullable public java.lang.Integer getGroupId()
PlexusIoResourceAttributesgetGroupId in interface PlexusIoResourceAttributes@Nullable public java.lang.String getGroupName()
PlexusIoResourceAttributesgetGroupName in interface PlexusIoResourceAttributespublic java.lang.Integer getUserId()
PlexusIoResourceAttributesgetUserId in interface PlexusIoResourceAttributespublic java.lang.String getUserName()
PlexusIoResourceAttributesgetUserName in interface PlexusIoResourceAttributespublic boolean isGroupExecutable()
isGroupExecutable in interface PlexusIoResourceAttributesprivate boolean checkFlag(char disabledValue,
int idx)
public boolean isGroupReadable()
isGroupReadable in interface PlexusIoResourceAttributespublic boolean isGroupWritable()
isGroupWritable in interface PlexusIoResourceAttributespublic boolean isOwnerExecutable()
isOwnerExecutable in interface PlexusIoResourceAttributespublic boolean isOwnerReadable()
isOwnerReadable in interface PlexusIoResourceAttributespublic boolean isOwnerWritable()
isOwnerWritable in interface PlexusIoResourceAttributespublic boolean isWorldExecutable()
isWorldExecutable in interface PlexusIoResourceAttributespublic boolean isWorldReadable()
isWorldReadable in interface PlexusIoResourceAttributespublic boolean isWorldWritable()
isWorldWritable in interface PlexusIoResourceAttributespublic java.lang.String toString()
toString in class java.lang.Objectpublic int getOctalMode()
PlexusIoResourceAttributesPlexusIoResourceAttributes.UNKNOWN_OCTAL_MODE if unsupported on current file/file systemgetOctalMode in interface PlexusIoResourceAttributespublic java.lang.String getOctalModeString()
public PlexusIoResourceAttributes setGroupId(java.lang.Integer gid)
public PlexusIoResourceAttributes setGroupName(java.lang.String name)
public PlexusIoResourceAttributes setUserId(java.lang.Integer uid)
public PlexusIoResourceAttributes setUserName(java.lang.String name)
public PlexusIoResourceAttributes setLsModeline(@Nonnull java.lang.String modeLine)
private void setMode(char value,
int modeIdx)
private void setOctalMode(int mode)
private void setExecutable(int index,
boolean executable)
private void setReadable(int index,
boolean readable)
private void setWriteable(int index,
boolean writable)
public boolean isSymbolicLink()
isSymbolicLink in interface PlexusIoResourceAttributes