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.119.0 (build 1634eac)",
date="2025-11-13T16:09:57.409Z")
@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
ConstructorsModifierConstructorDescriptionprotectedprotectedIgnoreStrategy(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedIgnoreStrategy(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionabstract voidAdds another pattern.completelyIgnores(String absoluteDirectoryPath) Determines whether a given directory path should be ignored and have all of its children ignored.static DockerIgnoreStrategyIgnores file paths based on the.dockerignore specification.static IgnoreStrategyfromCopyOptions(CopyOptions options, String absoluteRootPath) Creates an IgnoreStrategy based on theignoreModeandexcludein aCopyOptions.static GitIgnoreStrategyIgnores file paths based on the.gitignore specification.static GlobIgnoreStrategyIgnores file paths based on simple glob patterns.abstract BooleanDetermines 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, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
DockerIgnorePatternassociated with the given patterns.
-
fromCopyOptions
@Stability(Stable) @NotNull public static IgnoreStrategy fromCopyOptions(@NotNull CopyOptions options, @NotNull String absoluteRootPath) Creates an IgnoreStrategy based on theignoreModeandexcludein aCopyOptions.- Parameters:
options- theCopyOptionsto create theIgnoreStrategyfrom. This parameter is required.absoluteRootPath- the absolute path to the root directory of the paths to be considered. This parameter is required.- Returns:
IgnoreStrategybased 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:
GitIgnorePatternassociated 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:
GlobIgnorePatternassociated with the given patterns.
-
add
Adds another pattern.- Parameters:
pattern- This parameter is required.
-
completelyIgnores
Determines whether a given directory path should be ignored and have all of its children ignored.- Parameters:
absoluteDirectoryPath- absolute directory path to be assessed against the pattern. This parameter is required.- Returns:
trueif the directory and all of its children should be ignored
-
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:
trueif the file should be ignored
-