mirror of
https://github.com/NixOS/nix
synced 2025-07-06 05:01:48 +02:00
Remove FSInputAccessor
This commit is contained in:
parent
ba5929c7be
commit
20558e0462
15 changed files with 48 additions and 58 deletions
|
@ -166,4 +166,14 @@ void PosixSourceAccessor::assertNoSymlinks(CanonPath path)
|
|||
}
|
||||
}
|
||||
|
||||
ref<SourceAccessor> makeFSSourceAccessor()
|
||||
{
|
||||
static auto rootFS = make_ref<PosixSourceAccessor>();
|
||||
return rootFS;
|
||||
}
|
||||
|
||||
ref<SourceAccessor> makeFSSourceAccessor(std::filesystem::path root)
|
||||
{
|
||||
return make_ref<PosixSourceAccessor>(std::move(root));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -194,4 +194,14 @@ ref<SourceAccessor> makeEmptySourceAccessor();
|
|||
*/
|
||||
MakeError(RestrictedPathError, Error);
|
||||
|
||||
/**
|
||||
* Return an accessor for the root filesystem.
|
||||
*/
|
||||
ref<SourceAccessor> makeFSSourceAccessor();
|
||||
|
||||
/**
|
||||
* Return an accessor for the filesystem rooted at `root`.
|
||||
*/
|
||||
ref<SourceAccessor> makeFSSourceAccessor(std::filesystem::path root);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue