![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <fs-sink.hh>
Public Member Functions | |
| RestoreSink (bool startFsync, RestoreSinkHooks *hooks=nullptr) | |
| void | createDirectory (const CanonPath &path) override |
| void | createDirectory (const CanonPath &path, DirectoryCreatedCallback callback) override |
| void | createRegularFile (const CanonPath &path, fun< void(CreateRegularFileSink &)>) override |
| void | createSymlink (const CanonPath &path, const std::string &target) override |
Public Attributes | |
| std::filesystem::path | dstPath |
| AutoCloseFD | dirFd |
| bool | startFsync = false |
Additional Inherited Members | |
| Public Types inherited from nix::FileSystemObjectSink | |
| using | DirectoryCreatedCallback = fun<void(FileSystemObjectSink & dirSink, const CanonPath & dirRelPath)> |
Write files at the given path
|
overridevirtual |
Implements nix::FileSystemObjectSink.
|
overridevirtual |
Create a directory and invoke a callback with a pair of sink + CanonPath of the created subdirectory relative to dirSink.
Reimplemented from nix::FileSystemObjectSink.
|
overridevirtual |
This function in general is no re-entrant. Only one file can be written at a time.
Implements nix::FileSystemObjectSink.
|
overridevirtual |
Implements nix::FileSystemObjectSink.
| AutoCloseFD nix::RestoreSink::dirFd |
File descriptor for the directory located at dstPath. Used for at operations relative to this file descriptor. This sink must *never follow intermediate symlinks (starting from dstPath) in case a file collision is encountered for various reasons like case-insensitivity or other types on normalization. using appropriate *at system calls and traversing only one path component at a time ensures that writing is race-free and is is not susceptible to symlink replacement.