FD.adopt

Wrapper for adopting an fd immediately after being returned from external function

The usage should be FD fd = FD.adopt!"open"( .open("/path/to/file", O_RDWR) );

struct FD
static @safe @nogc
adopt
(
string errorMsg
)
(
int fd
)

Throws

ErrnoException in case fd is invalid

Meta