Top Description Fields Constructors Methods
io.vertx.core.file

public Class CopyOptions

extends Object
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
io.vertx.codegen.annotations.DataObject, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.json.JsonObject

Describes the copy (and move) options.
Author
Thomas Segismont

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
public static final boolean
DEFAULT_ATOMIC_MOVE

Whether move should be performed as an atomic filesystem operation by default = false.

public static final boolean
DEFAULT_COPY_ATTRIBUTES

Whether the file attributes should be copied by default = false.

public static final boolean
DEFAULT_NOFOLLOW_LINKS

Whether symbolic links should not be followed during copy or move operations by default = false.

public static final boolean
DEFAULT_REPLACE_EXISTING

Whether an existing file, empty directory, or link should be replaced by default = false.

private boolean
private boolean

Constructor Summary

AccessConstructor and Description
public
CopyOptions()

Default constructor.

public
CopyOptions(CopyOptions
the options to copy
other
)

Copy constructor.

public
CopyOptions(JsonObject
the JSON
json
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Constructor to create options from JSON.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if move should be performed as an atomic filesystem operation, false otherwise
isAtomicMove
()

public boolean

Returns:

true if the file attributes should be copied, false otherwise
isCopyAttributes
()

public boolean

Returns:

true if an existing file, empty directory, or link should be replaced, false otherwise
isReplaceExisting
()

public CopyOptions

Returns:

a reference to this, so the API can be used fluently
setAtomicMove
(boolean
true to perform as an atomic filesystem operation, false otherwise
atomicMove
)

Whether move should be performed as an atomic filesystem operation.

public CopyOptions

Returns:

a reference to this, so the API can be used fluently
setCopyAttributes
(boolean
true to copy attributes, false otherwise
copyAttributes
)

Whether the file attributes should be copied.

public CopyOptions

Returns:

a reference to this, so the API can be used fluently
setReplaceExisting
(boolean
true to replace, false otherwise
replaceExisting
)

Whether an existing file, empty directory, or link should be replaced.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

atomicMoveback to summary
private boolean atomicMove
copyAttributesback to summary
private boolean copyAttributes
DEFAULT_ATOMIC_MOVEback to summary
public static final boolean DEFAULT_ATOMIC_MOVE

Whether move should be performed as an atomic filesystem operation by default = false.

DEFAULT_COPY_ATTRIBUTESback to summary
public static final boolean DEFAULT_COPY_ATTRIBUTES

Whether the file attributes should be copied by default = false.

DEFAULT_REPLACE_EXISTINGback to summary
public static final boolean DEFAULT_REPLACE_EXISTING

Whether an existing file, empty directory, or link should be replaced by default = false.

replaceExistingback to summary
private boolean replaceExisting

Constructor Detail

CopyOptionsback to summary
public CopyOptions()

Default constructor.

CopyOptionsback to summary
public CopyOptions(CopyOptions other)

Copy constructor.

Parameters
other:CopyOptions

the options to copy

CopyOptionsback to summary
public CopyOptions(JsonObject json)

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Constructor to create options from JSON.

Parameters
json:JsonObject

the JSON

Method Detail

isAtomicMoveback to summary
public boolean isAtomicMove()
Returns:boolean

true if move should be performed as an atomic filesystem operation, false otherwise

isCopyAttributesback to summary
public boolean isCopyAttributes()
Returns:boolean

true if the file attributes should be copied, false otherwise

isReplaceExistingback to summary
public boolean isReplaceExisting()
Returns:boolean

true if an existing file, empty directory, or link should be replaced, false otherwise

setAtomicMoveback to summary
public CopyOptions setAtomicMove(boolean atomicMove)

Whether move should be performed as an atomic filesystem operation. Defaults to false.

Parameters
atomicMove:boolean

true to perform as an atomic filesystem operation, false otherwise

Returns:CopyOptions

a reference to this, so the API can be used fluently

setCopyAttributesback to summary
public CopyOptions setCopyAttributes(boolean copyAttributes)

Whether the file attributes should be copied. Defaults to false.

Parameters
copyAttributes:boolean

true to copy attributes, false otherwise

Returns:CopyOptions

a reference to this, so the API can be used fluently

setReplaceExistingback to summary
public CopyOptions setReplaceExisting(boolean replaceExisting)

Whether an existing file, empty directory, or link should be replaced. Defaults to false.

Parameters
replaceExisting:boolean

true to replace, false otherwise

Returns:CopyOptions

a reference to this, so the API can be used fluently