public class FileAttributes extends Object implements PlexusIoResourceAttributes
| Modifier and Type | Field and Description |
|---|---|
static LinkOption[] |
FOLLOW_LINK_OPTIONS |
static LinkOption[] |
NOFOLLOW_LINK_OPTIONS |
UNKNOWN_OCTAL_MODE| Constructor and Description |
|---|
FileAttributes(File file) |
FileAttributes(File file,
boolean followLinks) |
FileAttributes(File file,
Map<Integer,String> userCache,
Map<Integer,String> groupCache)
Deprecated.
use
FileAttributes(File) and remove the unused userCache and groupCache parameters |
FileAttributes(Integer userId,
String userName,
Integer groupId,
String groupName,
int octalMode,
boolean symbolicLink,
boolean regularFile,
boolean directory,
boolean other,
Set<PosixFilePermission> permissions,
long size,
FileTime lastModifiedTime) |
| Modifier and Type | Method and Description |
|---|---|
int |
calculatePosixOctalMode() |
Integer |
getGroupId()
Gets the unix group id.
|
String |
getGroupName()
The group name.
|
FileTime |
getLastModifiedTime() |
int |
getOctalMode()
Octal mode attributes.
|
String |
getOctalModeString() |
protected Set<PosixFilePermission> |
getPermissions() |
long |
getSize() |
Integer |
getUserId()
Gets the unix user id.
|
String |
getUserName()
Returns the user name of the user owning the file.
|
boolean |
hasGroupId() |
boolean |
hasUserId() |
boolean |
isDirectory() |
boolean |
isGroupExecutable() |
boolean |
isGroupReadable() |
boolean |
isGroupWritable() |
boolean |
isOther() |
boolean |
isOwnerExecutable() |
boolean |
isOwnerReadable() |
boolean |
isOwnerWritable() |
boolean |
isRegularFile() |
boolean |
isSymbolicLink()
Indicates if this is a symbolic link element.
|
boolean |
isWorldExecutable() |
boolean |
isWorldReadable() |
boolean |
isWorldWritable() |
String |
toString() |
static PlexusIoResourceAttributes |
uncached(File file) |
public static final LinkOption[] FOLLOW_LINK_OPTIONS
public static final LinkOption[] NOFOLLOW_LINK_OPTIONS
@Deprecated public FileAttributes(@Nonnull File file, @Nonnull Map<Integer,String> userCache, @Nonnull Map<Integer,String> groupCache) throws IOException
FileAttributes(File) and remove the unused userCache and groupCache parametersIOExceptionpublic FileAttributes(@Nonnull File file) throws IOException
IOExceptionpublic FileAttributes(@Nonnull File file, boolean followLinks) throws IOException
IOExceptionpublic FileAttributes(@Nullable Integer userId, String userName, @Nullable Integer groupId, @Nullable String groupName, int octalMode, boolean symbolicLink, boolean regularFile, boolean directory, boolean other, Set<PosixFilePermission> permissions, long size, FileTime lastModifiedTime)
@Nonnull public static PlexusIoResourceAttributes uncached(@Nonnull File file) throws IOException
IOException@Nullable public Integer getGroupId()
PlexusIoResourceAttributesgetGroupId in interface PlexusIoResourceAttributespublic boolean hasGroupId()
public boolean hasUserId()
@Nullable public String getGroupName()
PlexusIoResourceAttributesgetGroupName in interface PlexusIoResourceAttributespublic Integer getUserId()
PlexusIoResourceAttributesgetUserId in interface PlexusIoResourceAttributespublic String getUserName()
PlexusIoResourceAttributesgetUserName in interface PlexusIoResourceAttributespublic boolean isGroupExecutable()
isGroupExecutable in interface PlexusIoResourceAttributespublic 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 int getOctalMode()
PlexusIoResourceAttributesPlexusIoResourceAttributes.UNKNOWN_OCTAL_MODE if unsupported on current file/file systemgetOctalMode in interface PlexusIoResourceAttributespublic int calculatePosixOctalMode()
public String getOctalModeString()
public boolean isSymbolicLink()
PlexusIoResourceAttributesisSymbolicLink in interface PlexusIoResourceAttributespublic boolean isRegularFile()
public boolean isDirectory()
public boolean isOther()
public long getSize()
public FileTime getLastModifiedTime()
protected Set<PosixFilePermission> getPermissions()
Copyright © 2001–2023 Codehaus Plexus. All rights reserved.