Expand description
See the Process::fd() method
Fields§
§fd: i32
The file descriptor
mode: u16
The permission bits for this FD
Note: this field is only the owner read/write/execute bits. All the other bits
(include filetype bits) are masked out. See also the mode()
method.
target: FDTarget
Implementations§
source§impl FDInfo
impl FDInfo
sourcepub fn from_raw_fd(pid: i32, raw_fd: i32) -> ProcResult<Self>
pub fn from_raw_fd(pid: i32, raw_fd: i32) -> ProcResult<Self>
Gets a file descriptor from a raw fd
sourcepub fn from_raw_fd_with_root(
root: impl AsRef<Path>,
pid: i32,
raw_fd: i32
) -> ProcResult<Self>
pub fn from_raw_fd_with_root(
root: impl AsRef<Path>,
pid: i32,
raw_fd: i32
) -> ProcResult<Self>
Gets a file descriptor from a raw fd based on a specified /proc
path
sourcepub fn mode(&self) -> FDPermissions
pub fn mode(&self) -> FDPermissions
Gets the read/write mode of this file descriptor as a bitfield