NRP Core  1.4.1
FileFinder Class Reference

Find a file in a list of directories. More...

#include <file_finder.h>

Public Member Functions

std::filesystem::path operator() (const std::string &fileName, const std::vector< std::filesystem::path > &searchDirectories)
 Find first instance of file in searchDirectories. More...
 

Static Public Member Functions

static std::filesystem::path findFile (const std::string &fileName, const std::vector< std::filesystem::path > &searchDirectories)
 Find first instance of file in searchDirectories. More...
 

Detailed Description

Find a file in a list of directories.

Member Function Documentation

◆ findFile()

std::filesystem::path FileFinder::findFile ( const std::string &  fileName,
const std::vector< std::filesystem::path > &  searchDirectories 
)
static

Find first instance of file in searchDirectories.

Parameters
fileNameFilename to find
searchDirectoriesDirectories under which to search for file
Returns
Returns Path to fileName. Empty if not found

◆ operator()()

std::filesystem::path FileFinder::operator() ( const std::string &  fileName,
const std::vector< std::filesystem::path > &  searchDirectories 
)

Find first instance of file in searchDirectories.

Parameters
fileNameFilename to find
searchDirectoriesDirectories under which to search for file
Returns
Returns Path to fileName. Empty if not found

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