Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::AutoCloseFD Class Reference

#include <file-descriptor.hh>

Public Member Functions

 AutoCloseFD (Descriptor fd) noexcept
 AutoCloseFD (const AutoCloseFD &fd)=delete
 AutoCloseFD (AutoCloseFD &&fd) noexcept
AutoCloseFD & operator= (const AutoCloseFD &fd)=delete
AutoCloseFD & operator= (AutoCloseFD &&fd)
Descriptor get () const noexcept
 operator bool () const noexcept
Descriptor release () noexcept
void close ()
void fsync () const
void startFsync () const

Detailed Description

Automatic cleanup of resources.

Member Function Documentation

◆ fsync()

void nix::AutoCloseFD::fsync ( ) const
inline

Perform a blocking fsync operation.

◆ startFsync()

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.


The documentation for this class was generated from the following files: