Nix  2.93.0-dev
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::SourcePath Struct Reference

#include <source-path.hh>

Inheritance diagram for nix::SourcePath:
[legend]
Collaboration diagram for nix::SourcePath:
[legend]

Public Member Functions

 SourcePath (CanonPath path)
 
std::string_view baseName () const
 
SourcePath parent () const
 
const CanonPathcanonical () const
 
std::string to_string () const
 
CheckedSourcePath unsafeIntoChecked ()
 
SourcePath operator+ (const CanonPath &x) const
 
SourcePath operator+ (std::string_view c) const
 
bool operator== (const SourcePath &x) const
 
bool operator!= (const SourcePath &x) const
 
bool operator< (const SourcePath &x) const
 

Protected Attributes

CanonPath path
 

Detailed Description

An abstraction for manipulating path names during evaluation.

Member Function Documentation

◆ operator+() [1/2]

SourcePath nix::SourcePath::operator+ ( const CanonPath & x) const
inline

Append a CanonPath to this path.

◆ operator+() [2/2]

SourcePath nix::SourcePath::operator+ ( std::string_view c) const
inline

Append a single component c to this path. c must not contain a slash. A slash is implicitly added between this path and c.

◆ parent()

SourcePath nix::SourcePath::parent ( ) const

Construct the parent of this SourcePath. Aborts if this denotes the root.

◆ unsafeIntoChecked()

CheckedSourcePath nix::SourcePath::unsafeIntoChecked ( )
inline

Converts this SourcePath into a checked SourcePath, consuming it.


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