IgnoreStrategy
Represents file path ignoring behavior.
Initializers
import com.aliyun.ros.cdk.core.IgnoreStrategy;
new IgnoreStrategy();
| Name | Type | Description |
|---|---|---|
Methods
| Name | Description |
|---|---|
add |
Adds another pattern. |
ignores |
Determines whether a given file path should be ignored or not. |
add
public void add(java.lang.String pattern)
Adds another pattern.
- Type: java.lang.String
ignores
public java.lang.Boolean ignores(java.lang.String absoluteFilePath)
Determines whether a given file path should be ignored or not.
- Type: java.lang.String
absolute file path to be assessed against the pattern.
Static Functions
| Name | Description |
|---|---|
docker |
Ignores file paths based on the .dockerignore specification. |
fromCopyOptions |
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 com.aliyun.ros.cdk.core.IgnoreStrategy;
IgnoreStrategy.docker(java.lang.String absoluteRootPath, java.util.List<java.lang.String> patterns)
Ignores file paths based on the .dockerignore specification.
- Type: java.lang.String
the absolute path to the root directory of the paths to be considered.
- Type: java.util.List
fromCopyOptions
import com.aliyun.ros.cdk.core.IgnoreStrategy;
IgnoreStrategy.fromCopyOptions(CopyOptions options, java.lang.String absoluteRootPath)
Creates an IgnoreStrategy based on the ignoreMode and exclude in a CopyOptions.
- Type: CopyOptions
the CopyOptions to create the IgnoreStrategy from.
- Type: java.lang.String
the absolute path to the root directory of the paths to be considered.
git
import com.aliyun.ros.cdk.core.IgnoreStrategy;
IgnoreStrategy.git(java.lang.String absoluteRootPath, java.util.List<java.lang.String> patterns)
Ignores file paths based on the .gitignore specification.
- Type: java.lang.String
the absolute path to the root directory of the paths to be considered.
- Type: java.util.List
glob
import com.aliyun.ros.cdk.core.IgnoreStrategy;
IgnoreStrategy.glob(java.lang.String absoluteRootPath, java.util.List<java.lang.String> patterns)
Ignores file paths based on simple glob patterns.
- Type: java.lang.String
the absolute path to the root directory of the paths to be considered.
- Type: java.util.List