Class: AWSCDK::CopyOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
copy_options.rb

Overview

Options applied when copying directories.

Direct Known Subclasses

FingerprintOptions

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exclude: nil, follow: nil, ignore_mode: nil) ⇒ CopyOptions

Returns a new instance of CopyOptions.

Parameters:

  • exclude (Array<String>, nil) (defaults to: nil)

    File paths matching the patterns will be excluded.

  • follow (AWSCDK::SymlinkFollowMode, nil) (defaults to: nil)

    A strategy for how to handle symlinks.

  • ignore_mode (AWSCDK::IgnoreMode, nil) (defaults to: nil)

    The ignore behavior to use for exclude patterns.



10
11
12
13
14
15
16
17
# File 'copy_options.rb', line 10

def initialize(exclude: nil, follow: nil, ignore_mode: nil)
  @exclude = exclude
  Jsii::Type.check_type(@exclude, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "exclude") unless @exclude.nil?
  @follow = follow
  Jsii::Type.check_type(@follow, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TeW1saW5rRm9sbG93TW9kZSJ9")), "follow") unless @follow.nil?
  @ignore_mode = ignore_mode
  Jsii::Type.check_type(@ignore_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5JZ25vcmVNb2RlIn0=")), "ignoreMode") unless @ignore_mode.nil?
end

Instance Attribute Details

#excludeArray<String>? (readonly)

Note:

Default: - nothing is excluded

File paths matching the patterns will be excluded.

See ignore_mode to set the matching behavior. Has no effect on Assets bundled using the bundling property.

Returns:

  • (Array<String>, nil)


26
27
28
# File 'copy_options.rb', line 26

def exclude
  @exclude
end

#followAWSCDK::SymlinkFollowMode? (readonly)

Note:

Default: SymlinkFollowMode.NEVER

A strategy for how to handle symlinks.

Returns:



31
32
33
# File 'copy_options.rb', line 31

def follow
  @follow
end

#ignore_modeAWSCDK::IgnoreMode? (readonly)

Note:

Default: IgnoreMode.GLOB

The ignore behavior to use for exclude patterns.

Returns:



36
37
38
# File 'copy_options.rb', line 36

def ignore_mode
  @ignore_mode
end

Class Method Details

.jsii_propertiesObject



38
39
40
41
42
43
44
# File 'copy_options.rb', line 38

def self.jsii_properties
  {
    :exclude => "exclude",
    :follow => "follow",
    :ignore_mode => "ignoreMode",
  }
end

Instance Method Details

#to_jsiiObject



46
47
48
49
50
51
52
53
54
# File 'copy_options.rb', line 46

def to_jsii
  result = {}
  result.merge!({
    "exclude" => @exclude,
    "follow" => @follow,
    "ignoreMode" => @ignore_mode,
  })
  result.compact
end