FOSSology  4.4.0
Open Source License Compliance by Open Source Software
regexConfProvider.cc File Reference
#include "regexConfProvider.hpp"
Include dependency graph for regexConfProvider.cc:

Go to the source code of this file.

Functions

bool testIfFileExists (const string &filename)
 Check if a given file exists. More...
 
string getRegexConfFile (const string &identity)
 Get the regex conf file. More...
 

Function Documentation

◆ getRegexConfFile()

string getRegexConfFile ( const string &  identity)

Get the regex conf file.

Checks for regex file in

  1. Current directory
  2. Relative to test directory
  3. In installed directory

Return the first match found

Parameters
identityName of file to be found (without ".conf" extension)
Returns
Path of conf file as a string

Definition at line 47 of file regexConfProvider.cc.

◆ testIfFileExists()

bool testIfFileExists ( const string &  filename)

Check if a given file exists.

Parameters
filenameThe file path to check
Returns
True if exists and readable, false otherwise.

Definition at line 27 of file regexConfProvider.cc.