Added in API level 26
  
  
  
  
  
   
  
  
  
  
  
   
  
  
  
  
  
   
  
  
  
  
  
  
  
  
  
  
  
  
StandardCopyOption
  public
  
  final
  
  enum
  StandardCopyOption
  
  
  
  
    extends Enum<StandardCopyOption>
  
  
  
  
  
      implements
      
        CopyOption
      
  
  
| java.lang.Object | ||
| ↳ | java.lang.Enum<java.nio.file.StandardCopyOption> | |
| ↳ | java.nio.file.StandardCopyOption | |
Defines the standard copy options.
Summary
Enum values | |
|---|---|
StandardCopyOption  | 
    
      ATOMIC_MOVE
      Move the file as an atomic file system operation.  | 
  
StandardCopyOption  | 
    
      COPY_ATTRIBUTES
      Copy attributes to the new file.  | 
  
StandardCopyOption  | 
    
      REPLACE_EXISTING
      Replace an existing file if it exists.  | 
  
Public methods | |
|---|---|
        
        
        static
        
        
        StandardCopyOption
     | 
  
    
      
      valueOf(String name)
      
      
     | 
  
        
        
        static
        final
        
        StandardCopyOption[]
     | 
  
    
      
      values()
      
      
     | 
  
Inherited methods | |
|---|---|
Enum values
ATOMIC_MOVE
      
    Added in API level 26
  
      
  
    
public static final StandardCopyOption ATOMIC_MOVE
Move the file as an atomic file system operation.
COPY_ATTRIBUTES
      
    Added in API level 26
  
      
  
    
public static final StandardCopyOption COPY_ATTRIBUTES
Copy attributes to the new file.
REPLACE_EXISTING
      
    Added in API level 26
  
      
  
    
public static final StandardCopyOption REPLACE_EXISTING
Replace an existing file if it exists.
Public methods
valueOf
public static StandardCopyOption valueOf (String name)
| Parameters | |
|---|---|
name | 
        
          String  | 
      
| Returns | |
|---|---|
StandardCopyOption | 
        |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]