Sha256: 3e3e42326796433b74431714c554b7ad2a139f34f93b962313ad9b3ca22c0f86
Contents?: true
Size: 1.16 KB
Versions: 16
Compression:
Stored size: 1.16 KB
Contents
/** * @file * Declares utility functions for enumerating directories. */ #pragma once #include <string> #include <functional> namespace leatherman { namespace file_util { /** * Enumerates the files that match the given pattern in the given directory. * @param directory The directory to search for the files. * @param callback The callback to invoke when a matching file is found. * @param pattern The pattern to filter the file names by. If empty, all files are passed. */ void each_file(std::string const& directory, std::function<bool(std::string const&)> const& callback, std::string const& pattern = {}); /** * Enumerates the subdirectories in the given directory. * @param directory The directory to search for the subdirectories. * @param callback The callback to invoke when a matching subdirectory is found. * @param pattern The pattern to filter the subdirectory names by. If empty, all subdirectories are passed. */ void each_subdirectory(std::string const& directory, std::function<bool(std::string const&)> const& callback, std::string const& pattern = {}); }} // namespace leatherman::file_util
Version data entries
16 entries across 16 versions & 2 rubygems