DockerIgnoreStrategy
- class aws_cdk.DockerIgnoreStrategy(absolute_root_path, patterns)
- Bases: - IgnoreStrategy- Ignores file paths based on the - `.dockerignore specification<https://docs.docker.com/engine/reference/builder/#dockerignore-file>`_.- ExampleMetadata:
- fixture=_generated 
 - Example: - # The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk as cdk docker_ignore_strategy = cdk.DockerIgnoreStrategy("absoluteRootPath", ["patterns"]) - Parameters:
- absolute_root_path ( - str)
- patterns ( - Sequence[- str])
 
 - Methods - add(pattern)
- Adds another pattern. - Parameters:
- pattern ( - str)
- Params:
- pattern the pattern to add 
- Return type:
- None
 
 - completely_ignores(absolute_directory_path)
- Determines whether a given directory path should be ignored and have all of its children ignored. - Parameters:
- absolute_directory_path ( - str) – absolute directory path to be assessed against the pattern.
- Return type:
- bool
- Returns:
- trueif the directory and all of its children should be ignored
 
 - ignores(absolute_file_path)
- Determines whether a given file path should be ignored or not. - Parameters:
- absolute_file_path ( - str) – absolute file path to be assessed against the pattern.
- Return type:
- bool
- Returns:
- trueif the file should be ignored
 
 - Static Methods - classmethod docker(absolute_root_path, patterns)
- Ignores file paths based on the - `.dockerignore specification<https://docs.docker.com/engine/reference/builder/#dockerignore-file>`_.- Parameters:
- absolute_root_path ( - str) – the absolute path to the root directory of the paths to be considered.
- patterns ( - Sequence[- str])
 
- Return type:
- Returns:
- DockerIgnorePatternassociated with the given patterns.
 
 - classmethod from_copy_options(options, absolute_root_path)
- Creates an IgnoreStrategy based on the - ignoreModeand- excludein a- CopyOptions.- Parameters:
- options ( - Union[- CopyOptions,- Dict[- str,- Any]]) – the- CopyOptionsto create the- IgnoreStrategyfrom.
- absolute_root_path ( - str) – the absolute path to the root directory of the paths to be considered.
 
- Return type:
- Returns:
- IgnoreStrategybased on the- CopyOptions
 
 - classmethod git(absolute_root_path, patterns)
- Ignores file paths based on the - `.gitignore specification<https://git-scm.com/docs/gitignore>`_.- Parameters:
- absolute_root_path ( - str) – the absolute path to the root directory of the paths to be considered.
- patterns ( - Sequence[- str])
 
- Return type:
- Returns:
- GitIgnorePatternassociated with the given patterns.
 
 - classmethod glob(absolute_root_path, patterns)
- Ignores file paths based on simple glob patterns. - Parameters:
- absolute_root_path ( - str) – the absolute path to the root directory of the paths to be considered.
- patterns ( - Sequence[- str])
 
- Return type:
- Returns:
- GlobIgnorePatternassociated with the given patterns.