Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::CreateRegularFileSink Struct Referenceabstract

#include <fs-sink.hh>

Inheritance diagram for nix::CreateRegularFileSink:
nix::Sink nix::CreateMemoryRegularFile nix::RestoreRegularFile

Public Member Functions

virtual void isExecutable ()=0
virtual void preallocateContents (uint64_t size)
Public Member Functions inherited from nix::Sink
virtual void operator() (std::string_view data)=0
virtual bool good ()

Public Attributes

bool skipContents = false

Detailed Description

Actions on an open regular file in the process of creating it.

See FileSystemObjectSink::createRegularFile.

Member Function Documentation

◆ preallocateContents()

virtual void nix::CreateRegularFileSink::preallocateContents ( uint64_t size)
inlinevirtual

An optimization. By default, do nothing.

Reimplemented in nix::CreateMemoryRegularFile, and nix::RestoreRegularFile.

Member Data Documentation

◆ skipContents

bool nix::CreateRegularFileSink::skipContents = false

If set to true, the sink will not be called with the contents of the file. preallocateContents() will still be called to convey the file size. Useful for sinks that want to efficiently discard the contents of the file.


The documentation for this struct was generated from the following files:
  • libutil/include/nix/util/fs-sink.hh
  • libutil/fs-sink.cc