mirror of
https://github.com/NixOS/nix
synced 2025-06-28 13:41:15 +02:00
* A simple API for parsing NAR archives.
This commit is contained in:
parent
cdee317419
commit
5eaf644c99
3 changed files with 80 additions and 26 deletions
|
@ -56,6 +56,19 @@ extern PathFilter defaultPathFilter;
|
|||
void dumpPath(const Path & path, Sink & sink,
|
||||
PathFilter & filter = defaultPathFilter);
|
||||
|
||||
struct ParseSink
|
||||
{
|
||||
virtual void createDirectory(const Path & path) { };
|
||||
|
||||
virtual void createRegularFile(const Path & path) { };
|
||||
virtual void isExecutable() { };
|
||||
virtual void receiveContents(unsigned char * data, unsigned int len) { };
|
||||
|
||||
virtual void createSymlink(const Path & path, const string & target) { };
|
||||
};
|
||||
|
||||
void parseDump(ParseSink & sink, Source & source);
|
||||
|
||||
void restorePath(const Path & path, Source & source);
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue