Class Unix.Stat

  • Enclosing class:
    Unix

    public static final class Unix.Stat
    extends java.lang.Object
    A class representing the Unix stat structure.
    • Method Detail

      • tryGetSymbolicLink

        public java.lang.String tryGetSymbolicLink()
        Get link target of the symbolic link or null, 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()
      • isSymbolicLink

        public final boolean isSymbolicLink()
        Returns true, 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()