Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::DirectoryIterator Class Reference

A directory iterator that can be used to iterate over the contents of a directory. It is similar to std::filesystem::directory_iterator but throws NixError on failure instead of std::filesystem::filesystem_error. More...

#include <file-system.hh>

Public Types

using iterator_category = std::input_iterator_tag
using value_type = std::filesystem::directory_entry
using difference_type = std::ptrdiff_t
using pointer = const std::filesystem::directory_entry *
using reference = const std::filesystem::directory_entry &

Public Member Functions

 DirectoryIterator (const std::filesystem::path &p)
reference operator* () const
pointer operator-> () const
DirectoryIterator & operator++ ()
DirectoryIterator operator++ (int)
DirectoryIterator begin () const
DirectoryIterator end () const

Friends

bool operator== (const DirectoryIterator &a, const DirectoryIterator &b) noexcept
bool operator!= (const DirectoryIterator &a, const DirectoryIterator &b) noexcept

Detailed Description

A directory iterator that can be used to iterate over the contents of a directory. It is similar to std::filesystem::directory_iterator but throws NixError on failure instead of std::filesystem::filesystem_error.


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