C# Class Duplicity.Filtering.IgnoredFiles.GitIgnore.GitIgnoreParser

Parses either a .gitignore file ar a collection of input strings and creates a file system change filter according to the given pattern(s).
ファイルを表示 Open project: slashdotdash/Duplicity

Public Methods

Method Description
CreateFilter ( ) : IFileSystemChangeFilter
GitIgnoreParser ( IEnumerable input ) : System.Collections.Generic
GitIgnoreParser ( string pathToGitIgnoreFile ) : System.Collections.Generic

Private Methods

Method Description
CreatePatternMatcher ( string pattern ) : IMatcher
IsBlankLine ( string line ) : bool

A blank line matches no files, so it can serve as a separator for readability.

IsCommentedLine ( string line ) : bool

A line starting with # serves as a comment.

IsNegatedPattern ( string line ) : bool

An optional prefix ! which negates the pattern; any matching file excluded by a previous pattern will become included again. If a negated pattern matches, this will override lower precedence patterns sources.

Method Details

CreateFilter() public method

public CreateFilter ( ) : IFileSystemChangeFilter
return IFileSystemChangeFilter

GitIgnoreParser() public method

public GitIgnoreParser ( IEnumerable input ) : System.Collections.Generic
input IEnumerable
return System.Collections.Generic

GitIgnoreParser() public method

public GitIgnoreParser ( string pathToGitIgnoreFile ) : System.Collections.Generic
pathToGitIgnoreFile string
return System.Collections.Generic