Class FileStat

java.lang.Object
net.rubygrapefruit.platform.internal.FileStat
All Implemented Interfaces:
FileInfo, PosixFileInfo

public class FileStat extends Object implements PosixFileInfo
  • Constructor Details

    • FileStat

      public FileStat(String path)
  • Method Details

    • details

      public void details(int type, int mode, int uid, int gid, long size, long modificationTime, int blockSize)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getMode

      public int getMode()
      Description copied from interface: PosixFileInfo
      Returns the mode, or permissions, of this file.
      Specified by:
      getMode in interface PosixFileInfo
    • getType

      public FileInfo.Type getType()
      Description copied from interface: FileInfo
      Returns the type of this file.
      Specified by:
      getType in interface FileInfo
    • getUid

      public int getUid()
      Description copied from interface: PosixFileInfo
      Returns the UID of this file.
      Specified by:
      getUid in interface PosixFileInfo
    • getGid

      public int getGid()
      Description copied from interface: PosixFileInfo
      Returns the GID of this file.
      Specified by:
      getGid in interface PosixFileInfo
    • getSize

      public long getSize()
      Description copied from interface: FileInfo
      Returns the size of this file, in bytes. Returns 0 when this file is not a regular file.
      Specified by:
      getSize in interface FileInfo
    • getBlockSize

      public long getBlockSize()
      Description copied from interface: PosixFileInfo
      Returns the optimal block size for reading or writing to this file, in bytes.
      Specified by:
      getBlockSize in interface PosixFileInfo
    • getLastModifiedTime

      public long getLastModifiedTime()
      Description copied from interface: PosixFileInfo
      Returns the last modification time of this file, in ms since epoch.
      Specified by:
      getLastModifiedTime in interface FileInfo
      Specified by:
      getLastModifiedTime in interface PosixFileInfo