GlobParser

izumi.fundamentals.platform.resources.GlobParser
object GlobParser

Utility for parsing and matching glob patterns.

Supports explicit base path syntax with braces, multiple include patterns, exclusion patterns with ! prefix, and wildcards (* for single level, ** for recursive).

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
GlobParser.type

Members list

Type members

Classlikes

case class GlobPattern(basePath: String, includePatterns: List[String], excludePatterns: List[String])

Parsed glob pattern representation

Parsed glob pattern representation

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def globToRegex(pattern: String): String

Convert glob pattern to regex string

Convert glob pattern to regex string

Attributes

def matchesGlob(path: String, pattern: String): Boolean

Check if path matches a glob pattern

Check if path matches a glob pattern

Attributes

def matchesPattern(path: String, glob: GlobPattern): Boolean

Check if path matches the parsed glob pattern (any include and no excludes)

Check if path matches the parsed glob pattern (any include and no excludes)

Attributes

def normalizeSeparators(path: String): String

Normalize path separators to forward slashes (for Windows compatibility)

Normalize path separators to forward slashes (for Windows compatibility)

Attributes

def parseGlobExpr(pathExpr: String): GlobPattern

Parse glob expression like "basePath/{pattern1,pattern2,!exclude}" or legacy "pattern" (base path extracted automatically)

Parse glob expression like "basePath/{pattern1,pattern2,!exclude}" or legacy "pattern" (base path extracted automatically)

Attributes