123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #pragma once
- #include "types.hh"
- #include "serialise.hh"
- namespace nix {
- struct PathFilter
- {
- virtual ~PathFilter() { }
- virtual bool operator () (const Path & path) { return true; }
- };
- 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 preallocateContents(unsigned long long size) { };
- 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);
- }
|