1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

Move PosixSourceAccessor into its own file

This commit is contained in:
Eelco Dolstra 2023-10-23 11:05:50 +02:00
parent bcf5c31950
commit 34a42f0d0a
6 changed files with 122 additions and 109 deletions

View file

@ -104,31 +104,4 @@ struct SourceAccessor
virtual std::string showPath(const CanonPath & path);
};
/**
* A source accessor that uses the Unix filesystem.
*/
struct PosixSourceAccessor : SourceAccessor
{
/**
* The most recent mtime seen by lstat(). This is a hack to
* support dumpPathAndGetMtime(). Should remove this eventually.
*/
time_t mtime = 0;
void readFile(
const CanonPath & path,
Sink & sink,
std::function<void(uint64_t)> sizeCallback) override;
bool pathExists(const CanonPath & path) override;
Stat lstat(const CanonPath & path) override;
DirEntries readDirectory(const CanonPath & path) override;
std::string readLink(const CanonPath & path) override;
std::optional<CanonPath> getPhysicalPath(const CanonPath & path) override;
};
}