SlHelpers
SlKernCVS::Pattern Struct Reference

Holds git patterns and reports weights if matched. More...

#include <Pattern.h>

Public Member Functions

unsigned match (const std::filesystem::path &path) const
 Match a path against the stored patterns. More...
 

Static Public Member Functions

static std::optional< Patterncreate (std::string pattern)
 Build a (git) Pattern. More...
 

Detailed Description

Holds git patterns and reports weights if matched.

Member Function Documentation

◆ create()

static std::optional<Pattern> SlKernCVS::Pattern::create ( std::string  pattern)
static

Build a (git) Pattern.

Parameters
patternA pattern to build from
Returns
A Pattern if successful, otherwise nullopt.

◆ match()

unsigned SlKernCVS::Pattern::match ( const std::filesystem::path &  path) const
inline

Match a path against the stored patterns.

Parameters
pathA path to match
Returns
weight of the matches pattern or 0 if not found.

The documentation for this struct was generated from the following file: