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

#include <tarfile.hh>

Inheritance diagram for nix::TarSink:
nix::NullTarSink nix::merkle::TarAdapter

Public Member Functions

virtual void createDirectory (const CanonPath &path)=0
virtual void createRegularFile (const CanonPath &path, bool isExecutable, fun< void(Sink &)> callback)=0
virtual void createSymlink (const CanonPath &path, const std::string &target)=0
virtual void createHardlink (const CanonPath &path, const CanonPath &target)=0

Detailed Description

Sink for unpacking archives. Uses a path-based interface since archives can have entries in any order.

Of the three file system object sinks we have currently (this, FileSystemObjectSink, and merkle::FileSinkBuilder), this one is by far the "messiest", imposing the least structure. It is this rather a footgun, and one should avoid implementing it directly as much as possible.

Member Function Documentation

◆ createHardlink()

virtual void nix::TarSink::createHardlink ( const CanonPath & path,
const CanonPath & target )
pure virtual

Create a hard link. The target must be the path of a previously encountered file relative to the root.

Implemented in nix::NullTarSink.


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