OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::enum_file_fn Struct Reference

Function object to enumerate files in a directory. More...

#include <enum_file.hpp>

Public Types

using coro_t = boost::coroutines2::coroutine<std::filesystem::path>

Public Member Functions

auto operator() (std::filesystem::path const &root, bool recursive=false) const -> coro_t::pull_type

Detailed Description

Function object to enumerate files in a directory.

This functor provides a coroutine-based interface to enumerate files in a specified directory. It allows for both non-recursive and recursive enumeration of files, yielding the paths of the files found in the specified directory. The operator() takes a root path and a boolean flag indicating whether to perform recursive enumeration. It returns a coroutine pull type that yields the paths of the files found in the directory.

Member Function Documentation

◆ operator()()

auto oxy::enum_file_fn::operator() ( std::filesystem::path const & root,
bool recursive = false ) const -> coro_t::pull_type
inline
Parameters
root- The root directory path from which to enumerate files.
recursive- A boolean flag indicating whether to perform recursive enumeration of files.
Returns
A coroutine pull type that yields the paths of the files found in the directory.