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 |
private int |
octalMode |
private java.util.Set<java.nio.file.attribute.PosixFilePermission> |
permissions |
private boolean |
symbolicLink |
private java.lang.Integer |
userId |
private java.lang.String |
userName |
UNKNOWN_OCTAL_MODE| Constructor and Description |
|---|
FileAttributes(java.io.File file,
java.util.Map<java.lang.Integer,java.lang.String> userCache,
java.util.Map<java.lang.Integer,java.lang.String> groupCache) |
| Modifier and Type | Method and Description |
|---|---|
int |
calculatePosixOctalMode() |
private boolean |
containsPermission(java.nio.file.attribute.PosixFilePermission groupExecute) |
java.lang.Integer |
getGroupId()
Gets the unix group id.
|
java.lang.String |
getGroupName()
The group name.
|
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 |
hasGroupId() |
boolean |
hasUserId() |
boolean |
isGroupExecutable() |
boolean |
isGroupReadable() |
boolean |
isGroupWritable() |
boolean |
isOwnerExecutable() |
boolean |
isOwnerReadable() |
boolean |
isOwnerWritable() |
boolean |
isSymbolicLink() |
boolean |
isWorldExecutable() |
boolean |
isWorldReadable() |
boolean |
isWorldWritable() |
java.lang.String |
toString() |
static PlexusIoResourceAttributes |
uncached(java.io.File file) |
@Nullable private final java.lang.Integer groupId
@Nullable private final java.lang.String groupName
@Nullable private final java.lang.Integer userId
private final java.lang.String userName
private final boolean symbolicLink
private final int octalMode
private final java.util.Set<java.nio.file.attribute.PosixFilePermission> permissions
public FileAttributes(@Nonnull
java.io.File file,
@Nonnull
java.util.Map<java.lang.Integer,java.lang.String> userCache,
@Nonnull
java.util.Map<java.lang.Integer,java.lang.String> groupCache)
throws java.io.IOException
java.io.IOException@Nonnull public static PlexusIoResourceAttributes uncached(@Nonnull java.io.File file) throws java.io.IOException
java.io.IOException@Nullable public java.lang.Integer getGroupId()
PlexusIoResourceAttributesgetGroupId in interface PlexusIoResourceAttributespublic boolean hasGroupId()
public boolean hasUserId()
@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 containsPermission(java.nio.file.attribute.PosixFilePermission groupExecute)
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 int calculatePosixOctalMode()
public java.lang.String getOctalModeString()
public boolean isSymbolicLink()
isSymbolicLink in interface PlexusIoResourceAttributes