C# Class Duplicity.Filtering.IgnoredFiles.FnMatch.FileNameMatcher

This class can be used to match filenames against fnmatch like patterns. It is not thread save. Supported are the wildcard characters * and ? and groups with:
  • characters e.g. [abc]
  • ranges e.g. [a-z]
  • the following character classes
    • [:alnum:]
    • [:alpha:]
    • [:blank:]
    • [:cntrl:]
    • [:digit:]
    • [:graph:]
    • [:lower:]
    • [:print:]
    • [:punct:]
    • [:space:]
    • [:upper:]
    • [:word:]
    • [:xdigit:]
    e. g. [[:xdigit:]]
Mostra file Open project: slashdotdash/Duplicity Class Usage Examples

Public Methods

Method Description
Append ( string stringToMatch ) : void

CanAppendMatch ( ) : bool

CreateMatcherForSuffix ( ) : FileNameMatcher

FileNameMatcher ( FileNameMatcher other ) : System.Collections.Generic

A copy constructor which creates a new FileNameMatcher with the same state and Reset point like other.

FileNameMatcher ( string patternString, char invalidWildgetCharacter ) : System.Collections.Generic

IsMatch ( ) : bool

Reset ( ) : void

Resets this matcher to it's state right After construction.

Private Methods

Method Description
CreateHeadsStartValues ( string patternString, char invalidWildgetCharacter ) : IList
CreateSimpleHeads ( string patternPart, char invalidWildgetCharacter ) : IList
CreateWildCardHead ( char invalidWildgetCharacter, bool star ) : AbstractHead
ExtendStringToMatchByOneCharacter ( char c ) : void
FileNameMatcher ( IList headsStartValue ) : System.Collections.Generic

FileNameMatcher ( IList headsStartValue, ICollection heads ) : System.Collections.Generic

FindGroupEnd ( int indexOfStartBracket, string pattern ) : int
ParseHeads ( string pattern, char invalidWildgetCharacter ) : IList

Method Details

Append() public method

public Append ( string stringToMatch ) : void
stringToMatch string /// Extends the string which is matched against the patterns of this class. ///
return void

CanAppendMatch() public method

public CanAppendMatch ( ) : bool
return bool

CreateMatcherForSuffix() public method

public CreateMatcherForSuffix ( ) : FileNameMatcher
return FileNameMatcher

FileNameMatcher() public method

A copy constructor which creates a new FileNameMatcher with the same state and Reset point like other.
public FileNameMatcher ( FileNameMatcher other ) : System.Collections.Generic
other FileNameMatcher /// another instance. ///
return System.Collections.Generic

FileNameMatcher() public method

/// if the patternString contains a invalid fnmatch pattern. ///
public FileNameMatcher ( string patternString, char invalidWildgetCharacter ) : System.Collections.Generic
patternString string must contain a pattern which fnmatch would accept.
invalidWildgetCharacter char /// if this parameter isn't null then this character will not /// match at wildcards(* and ? are wildcards). ///
return System.Collections.Generic

IsMatch() public method

public IsMatch ( ) : bool
return bool

Reset() public method

Resets this matcher to it's state right After construction.
public Reset ( ) : void
return void