Struct FD
File descriptor wrapper
This wrapper's main purpose is to protect the fd against leakage. It does not actually do anything.
Constructors
Name | Description |
this
|
Initialize from an OS file descriptor.
|
this
|
Open a new file.
|
Properties
Name | Type | Description |
fileNo [get]
|
int | Obtain the underlying OS handle
|
isValid [get]
|
bool | Report whether the FD currently holds a valid fd
|
Methods
Name | Description |
adopt
|
Wrapper for adopting an fd immediately after being returned from external function
|
checkedCall
|
Run an fd based function and throw if it fails
|
close
|
Close the OS handle prematurely.
|
dup
|
Duplicate an FD
|
osCall
|
Call an OS function that accepts an FD as the first argument.
|
read
|
@safe read
|
write
|
@safe write
|