Package ghidra.pcode.emu.unix

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `MODE_R`
  The mode bit indicating read permission
  `static final int`
  `MODE_W`
  The mode bit indicating write permission
  `static final int`
  `MODE_X`
  The mode bit indicating execute permission
  `long`
  `st_atim_nsec`
  `long`
  `st_atim_sec`
  `long`
  `st_blksize`
  `long`
  `st_blocks`
  `long`
  `st_ctim_nsec`
  `long`
  `st_ctim_sec`
  `long`
  `st_dev`
  `int`
  `st_gid`
  `long`
  `st_ino`
  `int`
  `st_mode`
  `long`
  `st_mtim_nsec`
  `long`
  `st_mtim_sec`
  `long`
  `st_nlink`
  `long`
  `st_rdev`
  `long`
  `st_size`
  `int`
  `st_uid`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `EmuUnixFileStat()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `hasPermissions(int req, EmuUnixUser user)`
  Check if the given user has the requested permissions on the file described by this stat

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### MODE_R

    public static final int MODE_R
    The mode bit indicating read permission
    See Also:
      - Constant Field Values

  - ### MODE_W

    public static final int MODE_W
    The mode bit indicating write permission
    See Also:
      - Constant Field Values

  - ### MODE_X

    public static final int MODE_X
    The mode bit indicating execute permission
    See Also:
      - Constant Field Values

  - ### st_dev

    public long st_dev

  - ### st_ino

    public long st_ino

  - ### st_mode

    public int st_mode

  - ### st_nlink

    public long st_nlink

  - ### 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