mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
Use SourcePath in more places
Now that SourcePath uses a SourceAccessor instead of an InputAccessor, we can use it in function signatures instead of passing a SourceAccessor and CanonPath separately.
This commit is contained in:
parent
2926ef0e90
commit
eab2919119
25 changed files with 101 additions and 109 deletions
|
@ -41,6 +41,11 @@ struct SourcePath
|
|||
*/
|
||||
std::string readFile() const;
|
||||
|
||||
void readFile(
|
||||
Sink & sink,
|
||||
std::function<void(uint64_t)> sizeCallback = [](uint64_t size){}) const
|
||||
{ return accessor->readFile(path, sink, sizeCallback); }
|
||||
|
||||
/**
|
||||
* Return whether this `SourcePath` denotes a file (of any type)
|
||||
* that exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue