class DockerIgnoreStrategy
Language | Type name |
---|---|
![]() | Amazon.CDK.DockerIgnoreStrategy |
![]() | github.com/aws/aws-cdk-go/awscdk/v2#DockerIgnoreStrategy |
![]() | software.amazon.awscdk.DockerIgnoreStrategy |
![]() | aws_cdk.DockerIgnoreStrategy |
![]() | aws-cdk-lib » DockerIgnoreStrategy |
Extends
Ignore
Ignores file paths based on the .dockerignore specification
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const dockerIgnoreStrategy = new cdk.DockerIgnoreStrategy('absoluteRootPath', ['patterns']);
Initializer
new DockerIgnoreStrategy(absoluteRootPath: string, patterns: string[])
Parameters
- absoluteRootPath
string
- patterns
string[]
Methods
Name | Description |
---|---|
add(pattern) | Adds another pattern. |
ignores(absoluteFilePath) | Determines whether a given file path should be ignored or not. |
add(pattern)
public add(pattern: string): void
Parameters
- pattern
string
Adds another pattern.
ignores(absoluteFilePath)
public ignores(absoluteFilePath: string): boolean
Parameters
- absoluteFilePath
string
— absolute file path to be assessed against the pattern.
Returns
boolean
Determines whether a given file path should be ignored or not.