Package ch.systemsx.cisd.base.unix
Class Unix.Stat
- java.lang.Object
-
- ch.systemsx.cisd.base.unix.Unix.Stat
-
- Enclosing class:
- Unix
public static final class Unix.Stat extends java.lang.Object
A class representing the Unixstat
structure.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getBlockSize()
long
getDeviceId()
int
getGid()
long
getInode()
Returns the inode.long
getLastAccess()
Time when file data last accessed.Unix.Time
getLastAccessTime()
Time when file data last accessed.long
getLastModified()
Time when file data last modified.Unix.Time
getLastModifiedTime()
Time when file data last modified.long
getLastStatusChange()
Time when file status was last changed (inode data modification).Unix.Time
getLastStatusChangeTime()
Time when file status was last changed (inode data modification).FileLinkType
getLinkType()
long
getNumberOfBlocks()
int
getNumberOfHardLinks()
Returns the number of hard links for the linkName.short
getPermissions()
long
getSize()
int
getUid()
boolean
isSymbolicLink()
Returnstrue
, if this link is a symbolic link.java.lang.String
tryGetSymbolicLink()
Get link target of the symbolic link ornull
, if this is not a link or the link target has not been read.
-
-
-
Method Detail
-
tryGetSymbolicLink
public java.lang.String tryGetSymbolicLink()
Get link target of the symbolic link ornull
, if this is not a link or the link target has not been read.
-
getDeviceId
public long getDeviceId()
-
getInode
public long getInode()
Returns the inode.
-
getPermissions
public short getPermissions()
-
getLinkType
public FileLinkType getLinkType()
-
isSymbolicLink
public final boolean isSymbolicLink()
Returnstrue
, if this link is a symbolic link.
-
getNumberOfHardLinks
public int getNumberOfHardLinks()
Returns the number of hard links for the linkName. Does not dereference a symbolic link.- Throws:
IOExceptionUnchecked
- If the information could not be obtained, e.g. because the link does not exist.
-
getUid
public int getUid()
-
getGid
public int getGid()
-
getLastAccessTime
public Unix.Time getLastAccessTime()
Time when file data last accessed.Changed by the mknod(2), utimes(2) and read(2) system calls.
- Returns:
Unix.Time
object containing seconds (to nano-second resolution) since the epoch.
-
getLastAccess
public long getLastAccess()
Time when file data last accessed.Changed by the mknod(2), utimes(2) and read(2) system calls.
- Returns:
- Seconds since the epoch.
-
getLastModifiedTime
public Unix.Time getLastModifiedTime()
Time when file data last modified.Changed by the mknod(2), utimes(2) and write(2) system calls.
- Returns:
Unix.Time
object containing seconds (to nano-second resolution) since the epoch.
-
getLastModified
public long getLastModified()
Time when file data last modified.Changed by the mknod(2), utimes(2) and write(2) system calls.
- Returns:
- Seconds since the epoch.
-
getLastStatusChangeTime
public Unix.Time getLastStatusChangeTime()
Time when file status was last changed (inode data modification).Changed by the chmod(2), chown(2), link(2), mknod(2), rename(2), unlink(2), utimes(2) and write(2) system calls.
- Returns:
Unix.Time
object containing seconds (to nano-second resolution) since the epoch.
-
getLastStatusChange
public long getLastStatusChange()
Time when file status was last changed (inode data modification).Changed by the chmod(2), chown(2), link(2), mknod(2), rename(2), unlink(2), utimes(2) and write(2) system calls.
- Returns:
- Seconds since the epoch.
-
getSize
public long getSize()
-
getNumberOfBlocks
public long getNumberOfBlocks()
-
getBlockSize
public int getBlockSize()
-
-