IgnoreStrategy¶
-
class
aws_cdk.core.
IgnoreStrategy
¶ Bases:
object
Represents file path ignoring behavior.
Methods
-
abstract
add
(pattern)¶ Adds another pattern.
- Parameters
pattern (
str
) –- Params
pattern the pattern to add
- Return type
None
-
abstract
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
true
if 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
DockerIgnorePattern
associated with the given patterns.
-
classmethod
from_copy_options
(options, absolute_root_path)¶ Creates an IgnoreStrategy based on the
ignoreMode
andexclude
in aCopyOptions
.- Parameters
options (
CopyOptions
) – theCopyOptions
to create theIgnoreStrategy
from.absolute_root_path (
str
) – the absolute path to the root directory of the paths to be considered.
- Return type
- Returns
IgnoreStrategy
based on theCopyOptions
-
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
GitIgnorePattern
associated 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
GlobIgnorePattern
associated with the given patterns.
-
abstract