1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-30 14:10:59 +01:00

Checkpoint

This commit is contained in:
Eelco Dolstra 2022-03-01 19:08:20 +01:00
parent 00b0fb27c1
commit 06c1edf889
18 changed files with 134 additions and 120 deletions

View file

@ -72,16 +72,26 @@ ref<InputAccessor> makePatchingInputAccessor(
struct SourcePath
{
ref<InputAccessor> accessor;
InputAccessor & accessor;
Path path;
std::string_view baseName() const;
std::string readFile() const
{ return accessor->readFile(path); }
{ return accessor.readFile(path); }
bool pathExists() const
{ return accessor->pathExists(path); }
{ return accessor.pathExists(path); }
InputAccessor::DirEntries readDirectory() const
{ return accessor.readDirectory(path); }
void dumpPath(
Sink & sink,
PathFilter & filter = defaultPathFilter) const
{ return accessor.dumpPath(path, sink, filter); }
std::string to_string() const;
};
std::ostream & operator << (std::ostream & str, const SourcePath & path);