![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <fs-sink.hh>
Public Member Functions | |
| virtual void | directoryDone (Descriptor dirFd)=0 |
| Called when the callback passed to nix::RestoreSink::createDirectory() returns. | |
| virtual void | regularFileCreated (Descriptor fd, bool executable)=0 |
| virtual void | symlinkCreated (Descriptor parentFd, const OsFilename &name)=0 |
| Called after a symlink is created. | |
Hooks invoked when filesystem objects created by RestoreSink are complete, so callers can post-process them (e.g. metadata canonicalisation). By doing this in the hooks, the whole operation can be done in a single recursive tree traversal during unpacking.
|
pure virtual |
Called when the callback passed to nix::RestoreSink::createDirectory() returns.
Naturally, this means that recursive copying and nix::restorePath() drives these in post-order when walking up the directory tree. This makes it suitable for canonicalising permissions of directories.
| dirFd | File descriptor of the directory. |
Implemented in nix::CanonicalisingRestoreHooks.
|
pure virtual |
Called when the callback passed to nix::RestoreSink::createRegularFile() returns.
| fd | File descriptor of the file. |
| executable | Whether nix::CreateRegularFileSink::isExecutable() was called. |
Implemented in nix::CanonicalisingRestoreHooks.
|
pure virtual |
Called after a symlink is created.
| parentFd | Directory file descriptor of the symlink parent (immediate one). |
| name | Relative path of the symlink beneath the parent directory. |
Implemented in nix::CanonicalisingRestoreHooks.