# DuplicatesStrategy

enum DuplicatesStrategy(source)

Strategies for dealing with the potential creation of duplicate files or archive entries.

#### Since

1.7

## Entries

INCLUDE
Link copied to clipboard
INCLUDE

Do not attempt to prevent duplicates.

EXCLUDE
Link copied to clipboard
EXCLUDE

Do not allow duplicates by ignoring subsequent items to be created at the same path.

WARN
Link copied to clipboard
WARN

Do not attempt to prevent duplicates, but log a warning message when multiple items are to be created at the same path.

FAIL
Link copied to clipboard
FAIL

Throw a DuplicateFileCopyingException when subsequent items are to be created at the same path.

INHERIT
Link copied to clipboard
INHERIT

Uses the same strategy as the parent copy specification. This is the default behavior.

## Functions

valueOf
Link copied to clipboard
open fun valueOf(name: String): DuplicatesStrategy

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values
Link copied to clipboard
open fun values(): Array<DuplicatesStrategy>

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.