DockerIgnoreStrategy
Ignores file paths based on the .dockerignore specification
.
Initializers
import com.aliyun.ros.cdk.core.DockerIgnoreStrategy;
new DockerIgnoreStrategy(java.lang.String absoluteRootPath, java.util.List<java.lang.String> patterns);
Name | Type | Description |
---|---|---|
absoluteRootPath |
java.lang.String |
No description. |
patterns |
java.util.List |
No description. |
absoluteRootPath
Required
- Type: java.lang.String
patterns
Required
- Type: java.util.List
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.DockerIgnoreStrategy;
DockerIgnoreStrategy.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.DockerIgnoreStrategy;
DockerIgnoreStrategy.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.DockerIgnoreStrategy;
DockerIgnoreStrategy.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.DockerIgnoreStrategy;
DockerIgnoreStrategy.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