Class GitIgnoreStrategy
Ignores file paths based on the .gitignore specification
.
public class GitIgnoreStrategy : IgnoreStrategy
- Inheritance
-
GitIgnoreStrategy
- Inherited Members
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var gitIgnoreStrategy = new GitIgnoreStrategy("absoluteRootPath", new [] { "patterns" });
Remarks
ExampleMetadata: fixture=_generated
Constructors
GitIgnoreStrategy(string, string[])
public GitIgnoreStrategy(string absoluteRootPath, string[] patterns)
Parameters
Methods
Add(string)
Adds another pattern.
public override void Add(string pattern)
Parameters
pattern
string
Remarks
Params: pattern the pattern to add
Ignores(string)
Determines whether a given file path should be ignored or not.
public override bool Ignores(string absoluteFilePath)
Parameters
absoluteFilePath
stringabsolute file path to be assessed against the pattern.
Returns
- bool
true
if the file should be ignored