Package software.amazon.awscdk
Class IgnoreStrategy
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.IgnoreStrategy
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
- Direct Known Subclasses:
DockerIgnoreStrategy
,GitIgnoreStrategy
,GlobIgnoreStrategy
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-27T17:01:55.928Z")
@Stability(Stable)
public abstract class IgnoreStrategy
extends software.amazon.jsii.JsiiObject
Represents file path ignoring behavior.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.*; IgnoreStrategy ignoreStrategy = IgnoreStrategy.fromCopyOptions(CopyOptions.builder() .exclude(List.of("exclude")) .follow(SymlinkFollowMode.NEVER) .ignoreMode(IgnoreMode.GLOB) .build(), "absoluteRootPath");
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Constructor Summary
ModifierConstructorDescriptionprotected
protected
IgnoreStrategy
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
IgnoreStrategy
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Adds another pattern.static DockerIgnoreStrategy
Ignores file paths based on the.dockerignore specification
.static IgnoreStrategy
fromCopyOptions
(CopyOptions options, String absoluteRootPath) Creates an IgnoreStrategy based on theignoreMode
andexclude
in aCopyOptions
.static GitIgnoreStrategy
Ignores file paths based on the.gitignore specification
.static GlobIgnoreStrategy
Ignores file paths based on simple glob patterns.abstract Boolean
Determines whether a given file path should be ignored or not.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
IgnoreStrategy
protected IgnoreStrategy(software.amazon.jsii.JsiiObjectRef objRef) -
IgnoreStrategy
protected IgnoreStrategy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
IgnoreStrategy
@Stability(Stable) protected IgnoreStrategy()
-
-
Method Details
-
docker
@Stability(Stable) @NotNull public static DockerIgnoreStrategy docker(@NotNull String absoluteRootPath, @NotNull List<String> patterns) Ignores file paths based on the.dockerignore specification
.- Parameters:
absoluteRootPath
- the absolute path to the root directory of the paths to be considered. This parameter is required.patterns
- This parameter is required.- Returns:
DockerIgnorePattern
associated with the given patterns.
-
fromCopyOptions
@Stability(Stable) @NotNull public static IgnoreStrategy fromCopyOptions(@NotNull CopyOptions options, @NotNull String absoluteRootPath) Creates an IgnoreStrategy based on theignoreMode
andexclude
in aCopyOptions
.- Parameters:
options
- theCopyOptions
to create theIgnoreStrategy
from. This parameter is required.absoluteRootPath
- the absolute path to the root directory of the paths to be considered. This parameter is required.- Returns:
IgnoreStrategy
based on theCopyOptions
-
git
@Stability(Stable) @NotNull public static GitIgnoreStrategy git(@NotNull String absoluteRootPath, @NotNull List<String> patterns) Ignores file paths based on the.gitignore specification
.- Parameters:
absoluteRootPath
- the absolute path to the root directory of the paths to be considered. This parameter is required.patterns
- This parameter is required.- Returns:
GitIgnorePattern
associated with the given patterns.
-
glob
@Stability(Stable) @NotNull public static GlobIgnoreStrategy glob(@NotNull String absoluteRootPath, @NotNull List<String> patterns) Ignores file paths based on simple glob patterns.- Parameters:
absoluteRootPath
- the absolute path to the root directory of the paths to be considered. This parameter is required.patterns
- This parameter is required.- Returns:
GlobIgnorePattern
associated with the given patterns.
-
add
Adds another pattern.- Parameters:
pattern
- This parameter is required.
-
ignores
Determines whether a given file path should be ignored or not.- Parameters:
absoluteFilePath
- absolute file path to be assessed against the pattern. This parameter is required.- Returns:
true
if the file should be ignored
-