Show / Hide Table of Contents

Class IgnoreStrategy

Represents file path ignoring behavior.

Inheritance
object
IgnoreStrategy
DockerIgnoreStrategy
GitIgnoreStrategy
GlobIgnoreStrategy
Namespace: Amazon.CDK
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public abstract class IgnoreStrategy : DeputyBase
Syntax (vb)
Public MustInherit Class IgnoreStrategy Inherits DeputyBase
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;

            var ignoreStrategy = IgnoreStrategy.FromCopyOptions(new CopyOptions {
                Exclude = new [] { "exclude" },
                Follow = SymlinkFollowMode.NEVER,
                IgnoreMode = IgnoreMode.GLOB
            }, "absoluteRootPath");

Synopsis

Constructors

IgnoreStrategy()

Represents file path ignoring behavior.

Methods

Add(string)

Adds another pattern.

CompletelyIgnores(string)

Determines whether a given directory path should be ignored and have all of its children ignored.

Docker(string, string[])

Ignores file paths based on the .dockerignore specification.

FromCopyOptions(ICopyOptions, string)

Creates an IgnoreStrategy based on the ignoreMode and exclude in a CopyOptions.

Git(string, string[])

Ignores file paths based on the .gitignore specification.

Glob(string, string[])

Ignores file paths based on simple glob patterns.

Ignores(string)

Determines whether a given file path should be ignored or not.

Constructors

IgnoreStrategy()

Represents file path ignoring behavior.

protected IgnoreStrategy()
Remarks

ExampleMetadata: fixture=_generated

Examples
// The code below shows an example of how to instantiate this type.
            // The values are placeholders you should change.
            using Amazon.CDK;

            var ignoreStrategy = IgnoreStrategy.FromCopyOptions(new CopyOptions {
                Exclude = new [] { "exclude" },
                Follow = SymlinkFollowMode.NEVER,
                IgnoreMode = IgnoreMode.GLOB
            }, "absoluteRootPath");

Methods

Add(string)

Adds another pattern.

public abstract void Add(string pattern)
Parameters
pattern string
Remarks

Params: pattern the pattern to add

CompletelyIgnores(string)

Determines whether a given directory path should be ignored and have all of its children ignored.

public virtual bool CompletelyIgnores(string absoluteDirectoryPath)
Parameters
absoluteDirectoryPath string

absolute directory path to be assessed against the pattern.

Returns

bool

true if the directory and all of its children should be ignored

Remarks

ExampleMetadata: fixture=_generated

Docker(string, string[])

Ignores file paths based on the .dockerignore specification.

public static DockerIgnoreStrategy Docker(string absoluteRootPath, string[] patterns)
Parameters
absoluteRootPath string

the absolute path to the root directory of the paths to be considered.

patterns string[]

the absolute path to the root directory of the paths to be considered.

Returns

DockerIgnoreStrategy

DockerIgnorePattern associated with the given patterns.

Remarks

ExampleMetadata: fixture=_generated

FromCopyOptions(ICopyOptions, string)

Creates an IgnoreStrategy based on the ignoreMode and exclude in a CopyOptions.

public static IgnoreStrategy FromCopyOptions(ICopyOptions options, string absoluteRootPath)
Parameters
options ICopyOptions

the CopyOptions to create the IgnoreStrategy from.

absoluteRootPath string

the absolute path to the root directory of the paths to be considered.

Returns

IgnoreStrategy

IgnoreStrategy based on the CopyOptions

Remarks

ExampleMetadata: fixture=_generated

Git(string, string[])

Ignores file paths based on the .gitignore specification.

public static GitIgnoreStrategy Git(string absoluteRootPath, string[] patterns)
Parameters
absoluteRootPath string

the absolute path to the root directory of the paths to be considered.

patterns string[]

the absolute path to the root directory of the paths to be considered.

Returns

GitIgnoreStrategy

GitIgnorePattern associated with the given patterns.

Remarks

ExampleMetadata: fixture=_generated

Glob(string, string[])

Ignores file paths based on simple glob patterns.

public static GlobIgnoreStrategy Glob(string absoluteRootPath, string[] patterns)
Parameters
absoluteRootPath string

the absolute path to the root directory of the paths to be considered.

patterns string[]

the absolute path to the root directory of the paths to be considered.

Returns

GlobIgnoreStrategy

GlobIgnorePattern associated with the given patterns.

Remarks

ExampleMetadata: fixture=_generated

Ignores(string)

Determines whether a given file path should be ignored or not.

public abstract 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

Remarks

ExampleMetadata: fixture=_generated

Back to top Generated by DocFX