Constant rustix::fs::special::ABS

source ·
pub const ABS: BorrowedFd<'static>;
Expand description

-EBADF—A handle that requires paths to be absolute.

This is a file descriptor which refers to no directory, which can be used as the directory argument in *at functions such as openat, which causes them to fail with BADF if the accompanying path is not absolute.

This corresponds to the undocumented by commonly used convention of passing -EBADF as the dirfd argument, which is ignored if the path is absolute, and evokes an EBADF error otherwise.