Package ghidra.pcode.emu.unix
Class EmuUnixFileStat
java.lang.Object
ghidra.pcode.emu.unix.EmuUnixFileStat
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
Modifier and TypeFieldDescriptionstatic final int
The mode bit indicating read permissionstatic final int
The mode bit indicating write permissionstatic final int
The mode bit indicating execute permissionlong
long
long
long
long
long
long
int
long
int
long
long
long
long
long
int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasPermissions
(int req, EmuUnixUser user) Check if the given user has the requested permissions on the file described by this stat
-
Field Details
-
MODE_R
public static final int MODE_RThe mode bit indicating read permission- See Also:
-
MODE_W
public static final int MODE_WThe mode bit indicating write permission- See Also:
-
MODE_X
public static final int MODE_XThe 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_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
Check if the given user has the requested permissions on the file described by this stat- Parameters:
req
- the requested permissionsuser
- the user requesting permission- Returns:
- true if permitted, false if denied
-