Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::AllowListSourceAccessorImpl Struct Reference
Inheritance diagram for nix::AllowListSourceAccessorImpl:
nix::AllowListSourceAccessor nix::FilteringSourceAccessor nix::SourceAccessor

Public Member Functions

 AllowListSourceAccessorImpl (ref< SourceAccessor > next, std::set< CanonPath > &&allowedPrefixes, MakeNotAllowedError &&makeNotAllowedError)
 
bool isAllowed (const CanonPath &path) override
 
void allowPrefix (CanonPath prefix) override
 
- Public Member Functions inherited from nix::AllowListSourceAccessor
 FilteringSourceAccessor (const SourcePath &src, MakeNotAllowedError &&makeNotAllowedError)
 
- Public Member Functions inherited from nix::FilteringSourceAccessor
 FilteringSourceAccessor (const SourcePath &src, MakeNotAllowedError &&makeNotAllowedError)
 
std::optional< std::filesystem::path > getPhysicalPath (const CanonPath &path) override
 
std::string readFile (const CanonPath &path) override
 
bool pathExists (const CanonPath &path) override
 
std::optional< StatmaybeLstat (const CanonPath &path) override
 
DirEntries readDirectory (const CanonPath &path) override
 
std::string readLink (const CanonPath &path) override
 
std::string showPath (const CanonPath &path) override
 
void checkAccess (const CanonPath &path)
 
- Public Member Functions inherited from nix::SourceAccessor
virtual void readFile (const CanonPath &path, Sink &sink, std::function< void(uint64_t)> sizeCallback=[](uint64_t size){})
 
Stat lstat (const CanonPath &path)
 
virtual void dumpPath (const CanonPath &path, Sink &sink, PathFilter &filter=defaultPathFilter)
 
Hash hashPath (const CanonPath &path, PathFilter &filter=defaultPathFilter, HashAlgorithm ha=HashAlgorithm::SHA256)
 
bool operator== (const SourceAccessor &x) const
 
auto operator<=> (const SourceAccessor &x) const
 
void setPathDisplay (std::string displayPrefix, std::string displaySuffix="")
 
CanonPath resolveSymlinks (const CanonPath &path, SymlinkResolution mode=SymlinkResolution::Full)
 
virtual std::optional< time_t > getLastModified ()
 

Public Attributes

std::set< CanonPathallowedPrefixes
 
- Public Attributes inherited from nix::FilteringSourceAccessor
ref< SourceAccessornext
 
CanonPath prefix
 
MakeNotAllowedError makeNotAllowedError
 
- Public Attributes inherited from nix::SourceAccessor
const size_t number
 
std::string displayPrefix
 
std::string displaySuffix
 
std::optional< std::string > fingerprint
 

Additional Inherited Members

- Public Types inherited from nix::SourceAccessor
enum  Type {
  tRegular , tSymlink , tDirectory , tChar ,
  tBlock , tSocket , tFifo , tUnknown
}
 
typedef std::optional< TypeDirEntry
 
typedef std::map< std::string, DirEntry > DirEntries
 
- Static Public Member Functions inherited from nix::AllowListSourceAccessor
static ref< AllowListSourceAccessorcreate (ref< SourceAccessor > next, std::set< CanonPath > &&allowedPrefixes, MakeNotAllowedError &&makeNotAllowedError)
 

Member Function Documentation

◆ allowPrefix()

void nix::AllowListSourceAccessorImpl::allowPrefix ( CanonPath prefix)
inlineoverridevirtual

Grant access to the specified prefix.

Implements nix::AllowListSourceAccessor.

◆ isAllowed()

bool nix::AllowListSourceAccessorImpl::isAllowed ( const CanonPath & path)
inlineoverridevirtual

Return true iff access to path is allowed.

Implements nix::FilteringSourceAccessor.


The documentation for this struct was generated from the following file: