Table of Contents

Class GitIgnoreStrategy

Namespace
Amazon.CDK
Assembly
Amazon.CDK.dll

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

absoluteRootPath string
patterns string[]

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 string

absolute file path to be assessed against the pattern.

Returns

bool

true if the file should be ignored