GitIgnoreStrategy
Ignores file paths based on the .gitignore specification
.
Initializers
import ros_cdk_core
ros_cdk_core.GitIgnoreStrategy(
absolute_root_path: str,
patterns: typing.List[str]
)
Name | Type | Description |
---|---|---|
absolute_root_path |
str |
No description. |
patterns |
typing.List[str] |
No description. |
absolute_root_path
Required
- Type: str
patterns
Required
- Type: typing.List[str]
Methods
Name | Description |
---|---|
add |
Adds another pattern. |
ignores |
Determines whether a given file path should be ignored or not. |
add
def add(
pattern: str
) -> None
Adds another pattern.
- Type: str
ignores
def ignores(
absolute_file_path: str
) -> bool
Determines whether a given file path should be ignored or not.
- Type: str
absolute file path to be assessed against the pattern.
Static Functions
Name | Description |
---|---|
docker |
Ignores file paths based on the .dockerignore specification . |
from_copy_options |
Creates an IgnoreStrategy based on the ignoreMode and exclude in a CopyOptions . |
git |
Ignores file paths based on the .gitignore specification . |
glob |
Ignores file paths based on simple glob patterns. |
docker
import ros_cdk_core
ros_cdk_core.GitIgnoreStrategy.docker(
absolute_root_path: str,
patterns: typing.List[str]
)
Ignores file paths based on the .dockerignore specification
.
- Type: str
the absolute path to the root directory of the paths to be considered.
- Type: typing.List[str]
from_copy_options
import ros_cdk_core
ros_cdk_core.GitIgnoreStrategy.from_copy_options(
exclude: typing.List[str] = None,
follow: SymlinkFollowMode = None,
ignore_mode: IgnoreMode = None,
absolute_root_path: str
)
Creates an IgnoreStrategy based on the ignoreMode
and exclude
in a CopyOptions
.
- Type: typing.List[str]
- Default: nothing is excluded
File paths matching the patterns will be excluded.
See ignoreMode
to set the matching behavior.
Has no effect on Assets bundled using the bundling
property.
- Type: SymlinkFollowMode
- Default: SymlinkFollowMode.NEVER
A strategy for how to handle symlinks.
- Type: IgnoreMode
- Default: IgnoreMode.GLOB
The ignore behavior to use for exclude
patterns.
- Type: str
the absolute path to the root directory of the paths to be considered.
git
import ros_cdk_core
ros_cdk_core.GitIgnoreStrategy.git(
absolute_root_path: str,
patterns: typing.List[str]
)
Ignores file paths based on the .gitignore specification
.
- Type: str
the absolute path to the root directory of the paths to be considered.
- Type: typing.List[str]
glob
import ros_cdk_core
ros_cdk_core.GitIgnoreStrategy.glob(
absolute_root_path: str,
patterns: typing.List[str]
)
Ignores file paths based on simple glob patterns.
- Type: str
the absolute path to the root directory of the paths to be considered.
- Type: typing.List[str]