public enum CopyOption extends Enum<CopyOption>
CREATE
, REPLACE
,IGNORE
,APPEND
and RESUME
options
are mutually exclusive.
The VERIFY
option can only be used in combination with RESUME
.
The ASYNCHRONOUS
option can be combined with all others.Enum Constant and Description |
---|
APPEND
Append to destination file, failing if the file does not exists.
|
ASYNCHRONOUS
Perform the copy asynchronously.
|
CREATE
Copy to a new destination file, failing if the file already exists.
|
IGNORE
Skip the copy if the destination file if it already exists.
|
REPLACE
Replace the destination file if it already exists.
|
RESUME
Resume the copy to destination file, failing if the file does not exists.
|
VERIFY
When resuming a copy, verify that the destination file is a head of the source file.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
contains(CopyOption toFind,
CopyOption... options)
Check if a sequence of
CopyOption s contains a specific option. |
static CopyOption |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CopyOption[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CopyOption CREATE
public static final CopyOption REPLACE
public static final CopyOption IGNORE
public static final CopyOption APPEND
public static final CopyOption RESUME
public static final CopyOption VERIFY
public static final CopyOption ASYNCHRONOUS
public static CopyOption[] values()
for (CopyOption c : CopyOption.values()) System.out.println(c);
public static CopyOption valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static boolean contains(CopyOption toFind, CopyOption... options)
CopyOption
s contains a specific option.
If option
or options is null
, false
will be returned.
toFind
- the option to check for.options
- the options to check.options
contains option.