mrdocs::forEachFile

Visit each file in a directory.

Synopsis

Declared in <mrdocs/Support/Path.hpp>

template<class Visitor>
Expected<void>
forEachFile(
    std::string_view dirPath,
    bool recursive,
    Visitor&& visitor);

Return Value

An error if any occurred.

Parameters

Name

Description

dirPath

The path to the directory.

recursive

If true, files in subdirectories are also visited, recursively.

visitor

A callable object which is invoked for each file. This visitor might return void or Expected<void>.

Created with MrDocs