Lysa  0.0
Lysa 3D Engine
IgnoreRules Class Reference

Detailed Description

.gitignore/.lysaignore rules

Classes

struct  Rule
 

Public Member Functions

 IgnoreRules (const std::vector< std::string > &lines={})
 
bool isIgnored (std::string_view path, bool directory) const
 
const std::vector< Rule > & getRules () const
 

Static Public Member Functions

static bool matchGlob (std::string_view pattern, std::string_view path)
 
static bool isIgnored (std::string_view path, bool directory, const std::vector< Rule > &rules)
 

Constructor & Destructor Documentation

IgnoreRules ( const std::vector< std::string > &  lines = {})

Parse lines including comments, escapes, !, /, *, **, ?, and brackets

Member Function Documentation

const std::vector<Rule>& getRules ( ) const
inline

Access parsed rules in their original order

bool isIgnored ( std::string_view  path,
bool  directory 
) const

Test a relative path

static bool isIgnored ( std::string_view  path,
bool  directory,
const std::vector< Rule > &  rules 
)
static

Evaluate parsed rules

static bool matchGlob ( std::string_view  pattern,
std::string_view  path 
)
static

Match a glob