|
| MountedSourceAccessor (std::map< CanonPath, ref< SourceAccessor > > _mounts) |
|
std::string | readFile (const CanonPath &path) override |
|
bool | pathExists (const CanonPath &path) override |
|
std::optional< Stat > | maybeLstat (const CanonPath &path) override |
|
DirEntries | readDirectory (const CanonPath &path) override |
|
std::string | readLink (const CanonPath &path) override |
|
std::string | showPath (const CanonPath &path) override |
|
std::pair< ref< SourceAccessor >, CanonPath > | resolve (CanonPath path) |
|
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) |
|
virtual std::optional< std::filesystem::path > | getPhysicalPath (const CanonPath &path) |
|
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 () |
|
|
enum | Type {
tRegular
, tSymlink
, tDirectory
, tChar
,
tBlock
, tSocket
, tFifo
, tUnknown
} |
|
typedef std::optional< Type > | DirEntry |
|
typedef std::map< std::string, DirEntry > | DirEntries |
|
◆ maybeLstat()
std::optional< Stat > nix::MountedSourceAccessor::maybeLstat |
( |
const CanonPath & | path | ) |
|
|
inlineoverridevirtual |
◆ pathExists()
bool nix::MountedSourceAccessor::pathExists |
( |
const CanonPath & | path | ) |
|
|
inlineoverridevirtual |
◆ readDirectory()
DirEntries nix::MountedSourceAccessor::readDirectory |
( |
const CanonPath & | path | ) |
|
|
inlineoverridevirtual |
◆ readFile()
std::string nix::MountedSourceAccessor::readFile |
( |
const CanonPath & | path | ) |
|
|
inlineoverridevirtual |
Return the contents of a file as a string.
- Note
- Unlike Unix, this method should not follow symlinks. Nix by default wants to manipulate symlinks explicitly, and not implictly follow them, as they are frequently untrusted user data and thus may point to arbitrary locations. Acting on the targets targets of symlinks should only occasionally be done, and only with care.
Reimplemented from nix::SourceAccessor.
◆ readLink()
std::string nix::MountedSourceAccessor::readLink |
( |
const CanonPath & | path | ) |
|
|
inlineoverridevirtual |
◆ showPath()
std::string nix::MountedSourceAccessor::showPath |
( |
const CanonPath & | path | ) |
|
|
inlineoverridevirtual |
The documentation for this struct was generated from the following file:
- /home/buildozer/aports/community/nix/src/nix-2.26.3/src/libfetchers/mounted-source-accessor.cc