#include <file-descriptor.hh>
Public Member Functions | |
AutoCloseFD (Descriptor fd) | |
AutoCloseFD (const AutoCloseFD &fd)=delete | |
AutoCloseFD (AutoCloseFD &&fd) noexcept | |
AutoCloseFD & | operator= (const AutoCloseFD &fd)=delete |
AutoCloseFD & | operator= (AutoCloseFD &&fd) |
Descriptor | get () const |
operator bool () const | |
Descriptor | release () |
void | close () |
void | fsync () const |
void | startFsync () const |
Automatic cleanup of resources.
void nix::AutoCloseFD::fsync | ( | ) | const |
Perform a blocking fsync operation.
void nix::AutoCloseFD::startFsync | ( | ) | const |
Asynchronously flush to disk without blocking, if available on the platform. This is just a performance optimization, and fsync must be run later even if this is called.