Class EmuUnixFileStat

java.lang.Object
ghidra.pcode.emu.unix.EmuUnixFileStat

public class EmuUnixFileStat extends Object
Collects the stat fields common to UNIX platforms

See a UNIX manual for the exact meaning of each field.

TODO: Should this be parameterized with T?

TODO: Are these specific to Linux, or all UNIX?

  • Field Details

    • MODE_R

      public static final int MODE_R
      The mode bit indicating read permission
      See Also:
    • MODE_W

      public static final int MODE_W
      The mode bit indicating write permission
      See Also:
    • MODE_X

      public static final int MODE_X
      The mode bit indicating execute permission
      See Also:
    • st_dev

      public long st_dev
    • st_ino

      public long st_ino
    • st_mode

      public int st_mode
    • st_uid

      public int st_uid
    • st_gid

      public int st_gid
    • st_rdev

      public long st_rdev
    • st_size

      public long st_size
    • st_blksize

      public long st_blksize
    • st_blocks

      public long st_blocks
    • st_atim_sec

      public long st_atim_sec
    • st_atim_nsec

      public long st_atim_nsec
    • st_mtim_sec

      public long st_mtim_sec
    • st_mtim_nsec

      public long st_mtim_nsec
    • st_ctim_sec

      public long st_ctim_sec
    • st_ctim_nsec

      public long st_ctim_nsec
  • Constructor Details

    • EmuUnixFileStat

      public EmuUnixFileStat()
  • Method Details

    • hasPermissions

      public boolean hasPermissions(int req, EmuUnixUser user)
      Check if the given user has the requested permissions on the file described by this stat
      Parameters:
      req - the requested permissions
      user - the user requesting permission
      Returns:
      true if permitted, false if denied