StandardCopyOption

  • StandardCopyOption is a Java enum that defines standard options for file copy operations.

  • It provides three main options: ATOMIC_MOVE, COPY_ATTRIBUTES, and REPLACE_EXISTING.

  • ATOMIC_MOVE ensures the file move is performed as an atomic operation, COPY_ATTRIBUTES copies file attributes to the new file, and REPLACE_EXISTING replaces any existing file at the destination.

  • It inherits methods from Enum, Object, and Comparable for standard operations like comparison, equality checks, and obtaining enum values.

public final enum StandardCopyOption extends Enum<StandardCopyOption>
implements CopyOption

Defines the standard copy options.

Inherited Method Summary

Enum Values

public static final StandardCopyOption ATOMIC_MOVE

Move the file as an atomic file system operation.

public static final StandardCopyOption COPY_ATTRIBUTES

Copy attributes to the new file.

public static final StandardCopyOption REPLACE_EXISTING

Replace an existing file if it exists.