FileCopyOptions Struct
Options applied when copying directories into the staging location.
| Source | core/lib/fs/options.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const fileCopyOptions: cdk.FileCopyOptions = {
exclude: ['exclude'],
followSymlinks: cdk.SymlinkFollowMode.NEVER,
ignoreMode: cdk.IgnoreMode.GLOB,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
file_copy_options = cdk.FileCopyOptions(
exclude=["exclude"],
follow_symlinks=cdk.SymlinkFollowMode.NEVER,
ignore_mode=cdk.IgnoreMode.GLOB
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
FileCopyOptions fileCopyOptions = FileCopyOptions.builder()
.exclude(List.of("exclude"))
.followSymlinks(SymlinkFollowMode.NEVER)
.ignoreMode(IgnoreMode.GLOB)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var fileCopyOptions = new FileCopyOptions {
Exclude = new [] { "exclude" },
FollowSymlinks = SymlinkFollowMode.NEVER,
IgnoreMode = IgnoreMode.GLOB
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
fileCopyOptions := &FileCopyOptions{
Exclude: []*string{
jsii.String("exclude"),
},
FollowSymlinks: cdk.SymlinkFollowMode_NEVER,
IgnoreMode: cdk.IgnoreMode_GLOB,
}
Properties
excludeoptionalstring[]excludeoptionaltyping.List[str]excludeoptionalList<String>Excludeoptionalstring[]Excludeoptional*[]*string #File paths matching the patterns will be excluded.
Default: nothing is excluded
See ignoreMode to set the matching behavior. Has no effect on Assets bundled using the bundling property.
followSymlinksoptionalSymlinkFollowModefollow_symlinksoptionalSymlinkFollowModefollowSymlinksoptionalSymlinkFollowModeFollowSymlinksoptionalSymlinkFollowModeFollowSymlinksoptionalSymlinkFollowMode = SymlinkFollowMode.NEVER #A strategy for how to handle symlinks.
ignoreModeoptionalIgnoreModeignore_modeoptionalIgnoreModeignoreModeoptionalIgnoreModeIgnoreModeoptionalIgnoreModeIgnoreModeoptionalIgnoreMode = IgnoreMode.GLOB #The ignore behavior to use for `exclude` patterns.