Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::FSAccessor Class Referenceabstract

#include <fs-accessor.hh>

Inheritance diagram for nix::FSAccessor:
nix::LocalStoreAccessor nix::NarAccessor nix::RemoteFSAccessor

Classes

struct  Stat

Public Types

enum  Type { tMissing , tRegular , tSymlink , tDirectory }

Public Member Functions

virtual kj::Promise< Result< Stat > > stat (const Path &path)=0
virtual kj::Promise< Result< StringSet > > readDirectory (const Path &path)=0
virtual kj::Promise< Result< std::string > > readFile (const Path &path, bool requireValidPath=true)=0
virtual kj::Promise< Result< std::string > > readLink (const Path &path)=0

Detailed Description

An abstract class for accessing a filesystem-like structure, such as a (possibly remote) Nix store or the contents of a NAR file.

Member Function Documentation

◆ readFile()

virtual kj::Promise< Result< std::string > > nix::FSAccessor::readFile ( const Path & path,
bool requireValidPath = true )
pure virtual

Read a file inside the store.

If requireValidPath is set to true (the default), the path must be inside a valid store path, otherwise it just needs to be physically present (but not necessarily properly registered)

Implemented in nix::LocalStoreAccessor, nix::NarAccessor, and nix::RemoteFSAccessor.


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