Nix 2.26.3
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)
 
 AutoCloseFD (const AutoCloseFD &fd)=delete
 
 AutoCloseFD (AutoCloseFD &&fd) noexcept
 
AutoCloseFDoperator= (const AutoCloseFD &fd)=delete
 
AutoCloseFDoperator= (AutoCloseFD &&fd)
 
Descriptor get () const
 
 operator bool () const
 
Descriptor release ()
 
void close ()
 
void fsync () const
 
void startFsync () const
 

Detailed Description

Automatic cleanup of resources.

Member Function Documentation

◆ fsync()

void nix::AutoCloseFD::fsync ( ) const

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: